Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rate limiting information #52

Open
chills42 opened this issue Mar 5, 2021 · 2 comments
Open

Rate limiting information #52

chills42 opened this issue Mar 5, 2021 · 2 comments

Comments

@chills42
Copy link

chills42 commented Mar 5, 2021

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

@asqui
Copy link

asqui commented Mar 5, 2021

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.

@asqui
Copy link

asqui commented Mar 5, 2021

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@13a731c

If this is more generally useful maybe the maintainers can consider including this in the official release?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants