opsgenie-python-sdk
opsgenie-python-sdk copied to clipboard
Rate limiting information
I'm not seeing any clear way to make use of the rate limiting header information while using the SDK. Ideally, it would be nice to have the header values accessible for clearer understanding of throttling.
https://docs.opsgenie.com/docs/api-rate-limiting
I think you can get insight into throttling by subscribing to metrics: https://docs.opsgenie.com/docs/opsgenie-python-api-v2-1#metrics-publishing-support
API Metrics include throttling information in the resultMetadata
and HTTP Metrics include statusCode
which will be 429 for throttled requests.
If you don't need it programmatically, I think information about throttled requests is also available in the logging output.
Hmmm, on second thought, I think logging about throttled requests (and any other retries) is only available to me because of this patch I applied: BATS/opsgenie-python-sdk@13a731cb1d039a79b935e2eea0cb9082abb998d3
If this is more generally useful maybe the maintainers can consider including this in the official release?