Fix inconsistent exception logging patterns and add guidance#8231
Open
VamshikrishnaMonagari wants to merge 1 commit intoopen-telemetry:mainfrom
Open
Fix inconsistent exception logging patterns and add guidance#8231VamshikrishnaMonagari wants to merge 1 commit intoopen-telemetry:mainfrom
VamshikrishnaMonagari wants to merge 1 commit intoopen-telemetry:mainfrom
Conversation
7690798 to
699d1bd
Compare
…uidance Category A — Remove redundant e.getMessage() where exception is already passed as the Throwable parameter: - GrpcExporter.java - HttpExporter.java - JaegerRemoteSampler.java (also fix stale FINEST log to pass exception as Throwable instead of concatenating) Category B — Pass exception as Throwable instead of stringifying via getMessage(), so logging frameworks can render full stack traces: - AutoConfiguredOpenTelemetrySdkBuilder.java - DeclarativeConfiguration.java - TracerShim.java - SdkDoubleHistogram.java - SdkLongHistogram.java Add best practice guidance to CONTRIBUTING.md recommending the use of dedicated logger overloads that accept a Throwable parameter. Resolves open-telemetry#8228
699d1bd to
e01ec36
Compare
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #8231 +/- ##
============================================
- Coverage 90.32% 90.31% -0.01%
Complexity 7653 7653
============================================
Files 843 843
Lines 23080 23074 -6
Branches 2312 2312
============================================
- Hits 20846 20840 -6
+ Misses 1516 1515 -1
- Partials 718 719 +1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Category A : Remove redundant
e.getMessage()where exception is already passed as the Throwable parameter:GrpcExporter.javaHttpExporter.javaJaegerRemoteSampler.java(also fix stale FINEST log to pass exception as Throwable instead of concatenating)Category B : Pass exception as Throwable instead of stringifying via
getMessage(), so logging frameworks can render full stack traces:AutoConfiguredOpenTelemetrySdkBuilder.javaDeclarativeConfiguration.javaTracerShim.javaSdkDoubleHistogram.javaSdkLongHistogram.javaAdd best practice guidance to
CONTRIBUTING.mdrecommending the use of dedicated logger overloads that accept a Throwable parameter.Resolves #8228