File tree Expand file tree Collapse file tree 2 files changed +10
-2
lines changed Expand file tree Collapse file tree 2 files changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -26,6 +26,7 @@ futures-sink = "0.3"
2626once_cell = { workspace = true }
2727pin-project-lite = { workspace = true , optional = true }
2828thiserror = { workspace = true }
29+ tracing = {workspace = true , optional = true } # optional for opentelemetry internal logging
2930
3031[target .'cfg(all(target_arch = "wasm32", not(target_os = "wasi")))' .dependencies ]
3132js-sys = " 0.3.63"
@@ -38,6 +39,7 @@ testing = ["trace", "metrics"]
3839logs = []
3940logs_level_enabled = [" logs" ]
4041otel_unstable = []
42+ internal-logs = [" tracing" ]
4143
4244[dev-dependencies ]
4345opentelemetry_sdk = { path = " ../opentelemetry-sdk" , features = [" logs_level_enabled" ]} # for documentation tests
Original file line number Diff line number Diff line change 11//! Context extensions for tracing
22use crate :: {
3- global,
3+ global, otel_debug ,
44 trace:: { Span , SpanContext , Status } ,
55 Context , ContextGuard , KeyValue ,
66} ;
@@ -55,7 +55,13 @@ impl SpanRef<'_> {
5555 if let Some ( ref inner) = self . 0 . inner {
5656 match inner. lock ( ) {
5757 Ok ( mut locked) => f ( & mut locked) ,
58- Err ( err) => global:: handle_error ( err) ,
58+ Err ( err) => {
59+ otel_debug ! (
60+ name: "SpanRef.LockFailed" ,
61+ message = "Failed to acquire lock for SpanRef: {:?}" ,
62+ reason = format!( "{:?}" , err) ,
63+ span_context = format!( "{:?}" , self . 0 . span_context) ) ;
64+ }
5965 }
6066 }
6167 }
You can’t perform that action at this time.
0 commit comments