Commit 620043d
committed
propagate trace processor errors to users instead of internal logging
Remove internal logging of errors in span processors and tracer provider
in favor of returning errors to callers and providing an error handler
callback mechanism for background operations.
Changes:
- Add error_handler callback to BatchSpanProcessor for background errors
(span drops, export failures during timer-based flushes)
- Return errors from shutdown_with_timeout when spans were dropped
- Remove otel_debug/otel_warn/otel_error calls from span processors
- Simplify export error handling by propagating instead of logging
- Update BatchSpanProcessor builder with with_error_handler() method
- Change dropped_spans_count to Arc<AtomicUsize> for shared ownership
- Remove shutdown error logging from TracerProviderInner
This gives users explicit control over error handling rather than relying
on internal SDK logging that may be missed or not actionable.1 parent d721037 commit 620043d
File tree
3 files changed
+208
-160
lines changed- opentelemetry-sdk/src/trace
3 files changed
+208
-160
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
116 | 116 | | |
117 | 117 | | |
118 | 118 | | |
119 | | - | |
120 | | - | |
121 | | - | |
122 | | - | |
123 | | - | |
124 | | - | |
125 | | - | |
126 | | - | |
127 | 119 | | |
128 | 120 | | |
129 | 121 | | |
| |||
0 commit comments