-
Notifications
You must be signed in to change notification settings - Fork 101
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
Reduce logging of HTTP status codes #7993
Conversation
This change reduces the amount of logging we do in non-error cases by moving those logs to debug instead of info. In particular we generate a TON of logs for for asynchronous operations where the API is being polled at 1 second intervals by the CLI. Since it's hitting the operation status endpoint, the status code is always 200 and not especially meaningful. This change simplifies the logging by applying the following rules: - Non-2XX status codes continue to be logged at info level. - 2XX status code are now logged at debug level (off by default). Signed-off-by: Ryan Nowak <[email protected]>
@kachawla - interested in your thoughts in particular 👍 See PR summary for motivation and details. |
Radius functional test overview
Click here to see the list of tools in the current test run
Test Status⌛ Building Radius and pushing container images for functional tests... |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #7993 +/- ##
=======================================
Coverage 60.35% 60.36%
=======================================
Files 560 560
Lines 29417 29417
=======================================
+ Hits 17755 17757 +2
+ Misses 10114 10113 -1
+ Partials 1548 1547 -1 ☔ View full report in Codecov by Sentry. |
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'm in full support of this! 🚀
Description
This change reduces the amount of logging we do for an HTTP response in non-error cases by moving those logs to debug instead of info.
In particular we generate a TON of logs for for asynchronous operations where the API is being polled at 1 second intervals by the CLI. Since it's hitting the operation status endpoint, the status code is always 200 and not especially meaningful.
This change simplifies the logging by applying the following rules:
My motivation for this change is to make the logs more readable by making the more significant events visible. Right now it's hard to find significant events in our logs because there is a flood of "responded with 200" type events due to the nature of async operations. When an async operation is taking a long time to process, the relevant information might be 100s of lines back in the history.
I've been testing this out locally for a few days of work and I feel like it's really improved my ability to diagnose issues.
Type of change
Contributor checklist
Please verify that the PR meets the following requirements, where applicable: