File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change 1414
1515class InstanaTracer (BasicTracer ):
1616 sensor = None
17+ current_span = None
1718
1819 def __init__ (self , options = o .Options ()):
1920 self .sensor = instana .global_sensor
@@ -57,14 +58,19 @@ def start_span(
5758 ctx .sampled = self .sampler .sampled (ctx .trace_id )
5859
5960 # Tie it all together
60- return BasicSpan (
61+ self . current_span = BasicSpan (
6162 self ,
6263 operation_name = operation_name ,
6364 context = ctx ,
6465 parent_id = (None if parent_ctx is None else parent_ctx .span_id ),
6566 tags = tags ,
6667 start_time = start_time )
6768
69+ return self .current_span
70+
71+ def current_context (self ):
72+ return self .current_span .context
73+
6874 def inject (self , span_context , format , carrier ):
6975 if format in self ._propagators :
7076 self ._propagators [format ].inject (span_context , carrier )
You can’t perform that action at this time.
0 commit comments