-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
feat(inputs.prometheus): Add option to limit body length #14661
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.
Looks very good, just a minor thing.
…specified limit of body length
Co-authored-by: Thomas Casteleyn <thomas.casteleyn@me.com>
@Hipska |
@hhiroshell please fix the CI issues before we continue. Thanks for your work! |
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.
Thanks! I pushed a fix for tests.
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.
@hhiroshell just a few small comment from my side...
Co-authored-by: Sven Rebhan <36194019+srebhan@users.noreply.github.com>
Download PR build artifacts for linux_amd64.tar.gz, darwin_arm64.tar.gz, and windows_amd64.zip. 📦 Click here to get additional PR build artifactsArtifact URLs |
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.
Thanks @hhiroshell!
Summary
Introduce a new config option to ensure that the length of the response body is less than the specified limit.
If the body length exceeds the limit, input.prometheus plugin doesn't send the metrics to subsequent plugins. This can prevent running out of buffer space and dropping metrics when very large data is received.
This is to redo the previous PR(#14548) in order to clean up the commit logs and contain the fix for review comments at the PR.
Checklist
Related issues
resolves #14437