-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
Improve error message for stream rate limit. #4207
Conversation
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.
While I do think it will be nice to have some more introspection here, I'd like to minimize costs on the hot path. Additionally, it'd be nice to use the bytesize
types in the error messages to use human readable forms when possible.
Rebased off main but tests are still failing, @owen-d if the error message improvement is still relevant I will fix the issues with tests, otherwise we can close. |
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.
This is looking good, but since it's the hot path, I'd like to avoid unnecessarily re-checking the limit (which uses a mutex under the hood).
Test failures are unrelated, see: #4344 |
Signed-off-by: Callum Styan <callumstyan@gmail.com>
Signed-off-by: Callum Styan <callumstyan@gmail.com>
print human readable rate limits and log line byte lengths. Signed-off-by: Callum Styan <callumstyan@gmail.com>
Signed-off-by: Callum Styan <callumstyan@gmail.com>
Signed-off-by: Callum Styan <callumstyan@gmail.com>
directly since the rate limit error is an RPC error. Signed-off-by: Callum Styan <callumstyan@gmail.com>
Signed-off-by: Callum Styan <callumstyan@gmail.com>
pkg/ingester/stream.go
Outdated
// on each entry in the push (hot path) and we only use this value when logging entries that | ||
// passed the rate limit. |
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.
// on each entry in the push (hot path) and we only use this value when logging entries that | |
// passed the rate limit. | |
// on each entry in the push (hot path) and we only use this value when logging entries over | |
// the rate limit. |
Signed-off-by: Callum Styan <callumstyan@gmail.com>
Logs the rate limit, stream labels, and bytes for that push in the error/error message.
Signed-off-by: Callum Styan callumstyan@gmail.com