Skip to content

Commit f22283d

Browse files
committed
fix type again
1 parent caab3ce commit f22283d

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

sentry_sdk/integrations/opentelemetry/sampler.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,9 @@ def get_parent_sample_rate(parent_context, trace_id):
5959

6060
if is_span_context_valid and parent_context.trace_id == trace_id:
6161
parent_sample_rate = parent_context.trace_state.get(TRACESTATE_SAMPLE_RATE_KEY)
62+
if parent_sample_rate is None:
63+
return None
64+
6265
try:
6366
return float(parent_sample_rate)
6467
except Exception:

0 commit comments

Comments
 (0)