-
Notifications
You must be signed in to change notification settings - Fork 99
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 log level of sampling error logging #309
Conversation
Codecov Report
@@ Coverage Diff @@
## master #309 +/- ##
=========================================
Coverage 58.86% 58.86%
Complexity 1206 1206
=========================================
Files 131 131
Lines 5066 5066
Branches 593 593
=========================================
Hits 2982 2982
Misses 1809 1809
Partials 275 275
Continue to review full report at Codecov.
|
@@ -71,7 +71,7 @@ public void start() { | |||
try { | |||
pollRule(); | |||
} catch (Throwable t) { | |||
logger.error("Encountered error polling GetSamplingRules: ", t); | |||
logger.warn("Encountered error polling GetSamplingRules: ", t); |
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 think in practice error and warn are the same, probably should switch to info.
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.
The key difference is that warn is not emitted at the SDK's default log level, and I feel like warn is probably more accurate still. Info to me is more like "normal lifecycle event" which this is not.
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 don't think SDKs ever have a default log level - it's in the end user app usually in a logback.xml. It is fairly standard practice to only log things above info level I think. This is because many libraries just log all failures as warning and don't use error at all. I guess switching to warn doesn't practically change the chance of being annoyed by the log mmessages for many apps
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.
Ok that makes sense - I guess I'm getting my languages confused with default log levels. Went ahead and changed to info.
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.
hi! willarmiros! When will the latest version of the log level reduction for sampling error logs be released
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.
@yijiang-song unfortunately we cannot provide ETAs for our releases, please feel free to watch the repo for the next release.
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.
Thank you! I will continue to pay attention to this issue.
Issue #, if available:
aws/aws-xray-java-agent#65
Description of changes:
Given that errors retrieving sampling rules/targets are non-impacting to the fundamental functionality of tracing, we shouldn't be logging them at error level, especially since they are typically the result of transient network blips. Customers have complained about the verbose, scary looking error message in their logs.
@anuraaga would appreciate if you took a look.
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.