-
-
Notifications
You must be signed in to change notification settings - Fork 4.3k
Per-project rate limits not working correctly #6007
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
Comments
@mattrobenolt @tkaemming could one of you take a look at this today? its a high priority concern |
The frontend is sending this data in minute units, while the quota backend expects them to be seconds. So, what the UI is representing as "12 hour" window (720 minutes) is actually being treated as a "12 minute" (720 second) window by the backend. Backend ImplementationThe key quota query object is constructed as part of sentry/src/sentry/quotas/redis.py Lines 81 to 90 in 3935302
The parameters used to construct the quota query object are derived from sentry/src/sentry/quotas/base.py Lines 69 to 74 in 3935302
sentry/src/sentry/models/projectkey.py Lines 123 to 127 in 3935302
So, we have the sentry/src/sentry/quotas/redis.py Lines 29 to 30 in 3935302
Management UIThe sentry/src/sentry/api/endpoints/project_key_details.py Lines 99 to 105 in 3935302
sentry/src/sentry/api/endpoints/project_key_details.py Lines 36 to 38 in 3935302
On the front end, the rate limit windows are defined here with minute units: sentry/src/sentry/static/sentry/app/views/projectKeyDetails.jsx Lines 234 to 247 in 3935302
sentry/src/sentry/static/sentry/app/views/projectKeyDetails.jsx Lines 343 to 356 in 3935302
|
Great investigation overview @tkaemming 🥇 |
I also checked on the customer account that reported this — the UI shows them with a "1000 event(s) in 12 hours" rate limit (as noted in the original issue comment) that was being stored as |
@tkaemming would you mind putting up a quick fix for it? we could add a data migration as well, but there's only a handful of accounts using it, so fixing it in prod would also be fine. |
Yup, was planning on doing that today. I was thinking about fixing it at the model level to avoid the data migration, but I can do the data migration instead if that's your preference. |
no strong opinion -- it'll never be less than 1 minute |
As reported from a customer, per-project rate limiting is not respecting the limit they have set. They have limit set to 1000 events in 12 hrs but are seeing upwards of 5K errors in one day.
@getsentry/platform
The text was updated successfully, but these errors were encountered: