-
Notifications
You must be signed in to change notification settings - Fork 557
fix: Improved logging for OTLP Tonic Exporter #3108
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
base: main
Are you sure you want to change the base?
fix: Improved logging for OTLP Tonic Exporter #3108
Conversation
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #3108 +/- ##
=======================================
- Coverage 80.4% 80.4% -0.1%
=======================================
Files 126 126
Lines 22237 22261 +24
=======================================
Hits 17898 17898
- Misses 4339 4363 +24 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
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.
Pull Request Overview
This PR improves logging for OTLP Tonic Exporter by separating interceptor failures from export failures and providing more detailed error information while simplifying error messages passed upstream.
- Separates interceptor failure logging from export failure logging to better identify custom interceptor issues
- Enhances debug logging to include individual gRPC error fields (code, message, details) instead of formatting the entire error object
- Simplifies error messages returned to upstream components while maintaining detailed logging
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 12 comments.
File | Description |
---|---|
opentelemetry-otlp/src/exporter/tonic/trace.rs | Updates trace exporter with improved interceptor and export error logging |
opentelemetry-otlp/src/exporter/tonic/metrics.rs | Updates metrics exporter with improved interceptor and export error logging |
opentelemetry-otlp/src/exporter/tonic/logs.rs | Updates logs exporter with improved interceptor and export error logging |
grpc_message = e.message(), | ||
grpc_details = format!("{:?}", e.details()) | ||
); | ||
OTelSdkError::InternalFailure("Logs export failed in interceptor".into()) |
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.
should we at least add the grpc_code here ?
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.
neutral to it..we already log it here. And upstream SDK would log again... I can add just the grpc_code
alone to the failure message.
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.
Also, add TODO to do selective error handling - i.e. return detailed info for non-auth errors
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.
LGTM with nit comments
Improved logging
Related to #3021