File tree 2 files changed +10
-2
lines changed
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"
26
26
once_cell = { workspace = true }
27
27
pin-project-lite = { workspace = true , optional = true }
28
28
thiserror = { workspace = true }
29
+ tracing = {workspace = true , optional = true } # optional for opentelemetry internal logging
29
30
30
31
[target .'cfg(all(target_arch = "wasm32", not(target_os = "wasi")))' .dependencies ]
31
32
js-sys = " 0.3.63"
@@ -38,6 +39,7 @@ testing = ["trace", "metrics"]
38
39
logs = []
39
40
logs_level_enabled = [" logs" ]
40
41
otel_unstable = []
42
+ internal-logs = [" tracing" ]
41
43
42
44
[dev-dependencies ]
43
45
opentelemetry_sdk = { path = " ../opentelemetry-sdk" , features = [" logs_level_enabled" ]} # for documentation tests
Original file line number Diff line number Diff line change 1
1
//! Context extensions for tracing
2
2
use crate :: {
3
- global,
3
+ global, otel_debug ,
4
4
trace:: { Span , SpanContext , Status } ,
5
5
Context , ContextGuard , KeyValue ,
6
6
} ;
@@ -55,7 +55,13 @@ impl SpanRef<'_> {
55
55
if let Some ( ref inner) = self . 0 . inner {
56
56
match inner. lock ( ) {
57
57
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
+ }
59
65
}
60
66
}
61
67
}
You can’t perform that action at this time.
0 commit comments