We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5575c4f commit 8c30c47Copy full SHA for 8c30c47
opentelemetry/src/trace/context.rs
@@ -1,6 +1,6 @@
1
//! Context extensions for tracing
2
use crate::{
3
- global,
+ global, otel_debug,
4
trace::{Span, SpanContext, Status},
5
Context, ContextGuard, KeyValue,
6
};
@@ -55,8 +55,12 @@ impl SpanRef<'_> {
55
if let Some(ref inner) = self.0.inner {
56
match inner.lock() {
57
Ok(mut locked) => f(&mut locked),
58
- Err(_) => {
59
- // Ignoring the error silently. TODO: Add specific handling if needed.
+ Err(err) => {
+ 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
}
65
66
0 commit comments