opsgenie-go-sdk-v2
opsgenie-go-sdk-v2 copied to clipboard
Could not set requestId
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
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.
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,
})
Hey y'all, here is the Bug ticket to track this issue -> https://jira.atlassian.com/browse/OPSGENIE-1121
Its August, 2023 the bug ticket isn't even touched. Is the API still maintained at all?
It's 2024 and not much has changed... :(