Skip to content

Commit 0f56682

Browse files
committed
In case the sentry-trace says we defer the sampling descission, override the sampled field in trace_state
1 parent 0064118 commit 0f56682

File tree

1 file changed

+1
-1
lines changed
  • sentry_sdk/integrations/opentelemetry

1 file changed

+1
-1
lines changed

sentry_sdk/integrations/opentelemetry/scope.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ def _incoming_otel_span_context(self):
123123
# for twp to work, we also need to consider deferred sampling when the sampling
124124
# flag is not present, so the above TraceFlags are not sufficient
125125
if self._propagation_context.parent_sampled is None:
126-
trace_state = trace_state.add(TRACESTATE_SAMPLED_KEY, "deferred")
126+
trace_state = trace_state.update(TRACESTATE_SAMPLED_KEY, "deferred")
127127

128128
span_context = SpanContext(
129129
trace_id=int(self._propagation_context.trace_id, 16),

0 commit comments

Comments
 (0)