File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed
Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -226,7 +226,7 @@ macro_rules! __root_span {
226226 ( target: $target: expr, $lvl: expr, $name: expr, $( $fields: tt) * ) => {
227227 {
228228 use $crate:: telemetry:: tracing:: OpenTelemetrySpanExt as _;
229- use $crate:: telemetry:: opentelemetry:: { trace:: { get_active_span} , KeyValue } ;
229+ use $crate:: telemetry:: opentelemetry:: { trace:: { get_active_span, TraceContextExt } , KeyValue } ;
230230
231231 let src_span = $crate:: telemetry:: tracing:: Span :: current( ) ;
232232
@@ -238,6 +238,11 @@ macro_rules! __root_span {
238238 $( $fields) *
239239 ) ;
240240
241+ src_span. add_link_with_attributes(
242+ span. context( ) . span( ) . span_context( ) . clone( ) ,
243+ vec![ KeyValue :: new( "opentracing.ref_type" , "child_of" ) ] ,
244+ ) ;
245+
241246 span. follows_from( src_span) ;
242247 span. add_link_with_attributes(
243248 get_active_span( |span| span. span_context( ) . clone( ) ) ,
You can’t perform that action at this time.
0 commit comments