-
Notifications
You must be signed in to change notification settings - Fork 4.5k
Update max rate-limiting metadata #36734
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
Merged
Merged
Changes from 3 commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Checking the Sentry API doc, it seems like the rate limit window is a second:
We restrict both how frequently a request is made (requests per second rate limit) <...>
. What is the reasoning for having 60 seconds here?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was originally a bit confused by this as well, but when testing and viewing the response headers, the
x-sentry-rate-limit-reset
was being set to the next full minute from the request (so a request sent at12:00:02
will return a reset time of12:01:00
, as will a request from12:00:36
). Worth noting that I ran some more tests and some of the streams do seem to have smaller windows, but theevents
stream in particular consistently sets this value to the next full minute.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we document this somewhere as it would be interesting to know where this comes from. I'm also curious is HTTP requests to sentry can take more than a minute,
maxSecondsBetweenMessages
should be increased. I don't know how big the responses can be with big datasets but there is that to considerThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure thing, just added a comment for clarity 👍 I agree this value may actually be higher given it's not as set in stone as their docs would suggest, but my understanding is also that at the moment we don't actually do anything with this value unless it's at least 5400 seconds (or 90 minutes). Is that incorrect?