File tree Expand file tree Collapse file tree 2 files changed +8
-6
lines changed Expand file tree Collapse file tree 2 files changed +8
-6
lines changed Original file line number Diff line number Diff line change 1414otel_tracer = get_tracer (__name__ )
1515
1616
17- utils .drop_traces (tracer )
18-
19-
2017class OtelSpan (bm .Scenario ):
2118 nspans = bm .var (type = int )
2219 ntags = bm .var (type = int )
@@ -34,7 +31,11 @@ def run(self):
3431 setmetrics = len (metrics ) > 0
3532
3633 # run scenario to include finishing spans
34+ # Note - if finishspan is False the span will be gc'd when the SpanAggregrator._traces is reset
35+ # (ex: tracer.configure(filter) is called)
3736 finishspan = self .finishspan
37+ # Recreate span processors and configure global tracer to avoid sending traces to the agent
38+ utils .drop_traces (tracer )
3839
3940 def _ (loops ):
4041 for _ in range (loops ):
Original file line number Diff line number Diff line change 55from ddtrace import tracer
66
77
8- utils .drop_traces (tracer )
9-
10-
118class Span (bm .Scenario ):
129 nspans = bm .var (type = int )
1310 ntags = bm .var (type = int )
@@ -26,8 +23,12 @@ def run(self):
2623 setmetrics = len (metrics ) > 0
2724
2825 # run scenario to include finishing spans
26+ # Note - if finishspan is False the span will be gc'd when the SpanAggregrator._traces is reset
27+ # (ex: tracer.configure(filter) is called)
2928 finishspan = self .finishspan
3029 config ._128_bit_trace_id_enabled = self .traceid128
30+ # Recreate span processors and configure global tracer to avoid sending traces to the agent
31+ utils .drop_traces (tracer )
3132
3233 def _ (loops ):
3334 for _ in range (loops ):
You can’t perform that action at this time.
0 commit comments