Skip to content

Commit bc75162

Browse files
committed
udpate TracingHelper trait
1 parent f4519a1 commit bc75162

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

rust/cubestore/cubestore/src/telemetry/tracing.rs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,16 @@
11
use crate::config::injection::DIService;
22
use crate::CubeError;
33
use std::sync::Arc;
4+
use tracing::Span;
45

56
pub type TraceIdAndSpanId = (u128, u64);
67

78
pub trait TracingHelper: DIService + Send + Sync {
89
fn trace_and_span_id(&self) -> Option<TraceIdAndSpanId>;
10+
fn span_from_existing_trace(
11+
&self,
12+
trace_id_and_span_id: Option<TraceIdAndSpanId>,
13+
) -> Option<Span>;
914
}
1015

1116
pub struct TracingHelperImpl;
@@ -14,6 +19,13 @@ impl TracingHelper for TracingHelperImpl {
1419
fn trace_and_span_id(&self) -> Option<TraceIdAndSpanId> {
1520
None
1621
}
22+
23+
fn span_from_existing_trace(
24+
&self,
25+
_trace_id_and_span_id: Option<TraceIdAndSpanId>,
26+
) -> Option<Span> {
27+
None
28+
}
1729
}
1830

1931
impl TracingHelperImpl {

0 commit comments

Comments
 (0)