-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
filter: add ratelimit log #17902
filter: add ratelimit log #17902
Conversation
Hi @zirain, welcome and thank you for your contribution. We will try to review your Pull Request as quickly as possible. In the meantime, please take a look at the contribution guidelines if you have not done so already. |
Please add signature for every commit by |
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. We do need some logs to help us to debug rate limit filter.
I add some initial comments to help us to complete this.
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! Got a small question. Please take a look at the format and DCO
/wait |
do we still wait something else? |
Is the CI is passing the DCO and the format check? |
You will need to apply the DCO on the first commit (follow the instructions here) which would require rewritting the git history of your PR. Also take a look at https://dev.azure.com/cncf/envoy/_build/results?buildId=87580&view=logs&j=55bc2ab9-36c1-5ab8-58a6-8c258728eeff&t=33b57bf9-ef13-58c8-bc2b-f804aeb16d39 which indicates that you have some format errors |
These are the remaining problems. |
All checks have passed. |
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, LGTM @envoyproxy/senior-maintainers for a second review
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. And waiting senior-maintainers to merge it.
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, small comment.
/wait
ENVOY_LOG_TO_LOGGER(Logger::Registry::getLog(Logger::Id::filter), warn, | ||
"rate limit fail, status={} msg={}", status, msg); |
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 will log spam at high volume if the upstream RL server is having issues which I don't think is what we want. I would switch this to debug. There should already be a failure stat. If not we can add one?
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.
there's nothing record right now when the upstream RL server is having issues, I think 'warn' is suitable in this scenario
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.
As I said it's not suitable for log spamming reasons. If there is no other stat, you can also potentially use ENVOY_LOG_EVERY_POW_2
or similar.
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.
switch it to debug
Signed-off-by: zirain <[email protected]>
@mattklein123 please check the code again |
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!
Commit Message: add ratelimt log
Additional Description:
add some log to help debug ratelimt filter, in following cases specially:
Risk Level: Low
Testing: manual testing
Docs Changes:
Release Notes:
Platform Specific Features:
[Optional Runtime guard:]
[Optional Fixes #Issue]
[Optional Deprecated:]
[Optional API Considerations:]