-
Notifications
You must be signed in to change notification settings - Fork 436
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
Remove Global Error handler. #2260
Remove Global Error handler. #2260
Conversation
…elemetry-rust into remove-global-error-handler
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.
Given this is breaking change, we need to add it to changelog. and also show a migration guide for anyone who were relying on this previously.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #2260 +/- ##
=====================================
Coverage 79.4% 79.5%
=====================================
Files 121 121
Lines 20981 20960 -21
=====================================
- Hits 16673 16671 -2
+ Misses 4308 4289 -19 ☔ View full report in Codecov by Sentry. |
Done/ |
Co-authored-by: Cijo Thomas <[email protected]>
Co-authored-by: Cijo Thomas <[email protected]>
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.
I'll try our self-diagnostics with few scenarios later and make suggestions, if any. (I am a customer of the internal logs !!)
Fixes #2175
Needs #2259 #2257 #2256 to be merged first.
Changes
global::set_error_handler
andglobal::handle_error
, as theglobal_handle_error
usage inside the opentelemetry crates has already been replaced withglobal::otel_info
,otel_warn
,otel_debug
andotel_error
Migration Guide:
This guide explains how to migrate from
global::set_error_handler
to a new setup withotel_*
macros and Tokio tracing. If your application previously usedglobal::set_error_handler
, remove it as part of this migration. If not, this configuration ensures errors previously going toeprintln!
are now handled through structured tracing.Step 1: Remove set_error_handler (if used)
If your code currently sets a custom error handler using global::set_error_handler, remove this line and any associated custom handler function.
Step 2: Internal OpenTelemetry Logs Filter and Layer:
Set up a layer to handle OpenTelemetry internal logs and stop them from propagating to tracing bridge/appender.
Step 3: Register Layers in the Tracing Registry
Merge requirement checklist
CHANGELOG.md
files updated for non-trivial, user-facing changes