stripe / stripe-python

Python library for the Stripe API.
https://stripe.com
MIT License
1.64k stars 418 forks source link

Ability to query for previous API requests #1352

Closed clairelin135 closed 2 months ago

clairelin135 commented 2 months ago

Is your feature request related to a problem? Please describe.

I'm trying to programmatically monitor the number of API requests made to Stripe, to alert when usage is nearing the rate limit.

But I'm not finding a way to query for logs / API requests. Is it possible to expose this information programmatically, given that it's already available on the Developers tab in the UI?

Describe the solution you'd like

No response

Describe alternatives you've considered

No response

Additional context

No response

remi-stripe commented 2 months ago

@clairelin135 We don't have any API for request logs and we don't plan to add one in the near future. Logs are mostly for debugging and available in the Dashboard. I think the best approach for now is for you to track the requests you are making to our API for example before/after each request with your own metrics/events and that would allow you to measure how many requests you do overall.

I'm going to close the issue mostly because this is not something we're likely to add the to SDKs in the future but I'll track it as an API feature request internally.