-
Notifications
You must be signed in to change notification settings - Fork 523
Update OTLP examples to use opentelemetry-appender-tracing, with filtering of the events from specific crates. #1798
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
Update OTLP examples to use opentelemetry-appender-tracing, with filtering of the events from specific crates. #1798
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #1798 +/- ##
=======================================
- Coverage 73.6% 73.5% -0.1%
=======================================
Files 124 124
Lines 19482 19482
=======================================
- Hits 14341 14338 -3
- Misses 5141 5144 +3 ☔ View full report in Codecov by Sentry. |
@@ -91,9 +93,21 @@ async fn main() -> Result<(), Box<dyn Error + Send + Sync + 'static>> { | |||
let logger_provider = init_logs().unwrap(); | |||
|
|||
// Create a new OpenTelemetryLogBridge using the above LoggerProvider. |
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.
// Create a new OpenTelemetryLogBridge using the above LoggerProvider. | |
// Create a new OpenTelemetryTracingBridge using the above LoggerProvider. |
log::set_max_level(Level::Info.to_level_filter()); | ||
let layer = OpenTelemetryTracingBridge::new(&logger_provider); | ||
|
||
// add a tracing filter to filter the events generated from the crates used by opentelemetry-otlp |
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.
please add a link to the tracking issue, and also warn that, the events from this layer will be filtered for this layer irrespective of if they occur inside OTLP Exporting or not, potentially leading to blind spots.
Fixes #1797
Design discussion issue (if applicable) #
Changes
Please provide a brief description of the changes here.
Merge requirement checklist
CHANGELOG.md
files updated for non-trivial, user-facing changes