opsgenie-go-sdk-v2 icon indicating copy to clipboard operation
opsgenie-go-sdk-v2 copied to clipboard

Could not set requestId

Open MaggotMouth opened this issue 2 years ago • 5 comments

We're getting a lot of warnings for Could not set requestId.

It seems to be coming from this line https://github.com/opsgenie/opsgenie-go-sdk-v2/blob/master/client/client.go#L149

Below is a sample of a response not containing the requestId as logged by this line https://github.com/opsgenie/opsgenie-go-sdk-v2/blob/master/client/client.go#L501 :

time=2022/10/31 08:50:01 level=debug msg=Request processed. The result: &{ResultMetadata:{RequestId: ResponseTime:0.031 RateLimitState:OK RateLimitReason: RateLimitPeriod: RetryCount:0} Parent:{Id:a3f182a3-7860-40da-9832-d238cbe6d3aa Name:TEST_TEAM_schedule Enabled:true} OnCallParticipants:[] OnCallRecipients:[]}

The endpoint in question is https://docs.opsgenie.com/docs/who-is-on-call-api#get-on-calls for the above log entry

MaggotMouth avatar Oct 31 '22 09:10 MaggotMouth

Can confirm that curl'ing the endpoint does not result in the X-Request-Id being present in the headers as is expected in the SDK.

MaggotMouth avatar Oct 31 '22 12:10 MaggotMouth

I changed the loglevel to ErrorLevel the warning not appeared, but it is not a resolve the problem but it can hide it

	scheduleClient, err := schedule.NewClient(&client.Config{
		ApiKey: apiKey,
		LogLevel: logrus.ErrorLevel,
	})

y0rune avatar Nov 01 '22 15:11 y0rune

Hey y'all, here is the Bug ticket to track this issue -> https://jira.atlassian.com/browse/OPSGENIE-1121

gg5201818 avatar Dec 02 '22 11:12 gg5201818

Its August, 2023 the bug ticket isn't even touched. Is the API still maintained at all?

mkurde avatar Aug 02 '23 15:08 mkurde

It's 2024 and not much has changed... :(

migueleliasweb avatar Jan 23 '24 05:01 migueleliasweb