We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 69dfe92 commit 1b8521bCopy full SHA for 1b8521b
sentry_sdk/integrations/opentelemetry/sampler.py
@@ -141,12 +141,8 @@ def should_sample(
141
# Check if there is a traces_sampler
142
# Traces_sampler is responsible to check parent sampled to have full transactions.
143
has_traces_sampler = callable(client.options.get("traces_sampler"))
144
- custom_parent_sampled = attributes.get(
145
- SentrySpanAttribute.CUSTOM_PARENT_SAMPLED
146
- )
147
- if custom_parent_sampled is not None:
148
- parent_sampled = custom_parent_sampled
149
- else:
+ parent_sampled = attributes.get(SentrySpanAttribute.CUSTOM_PARENT_SAMPLED)
+ if parent_sampled is None:
150
parent_sampled = get_parent_sampled(parent_span_context, trace_id)
151
152
if is_root_span and has_traces_sampler:
0 commit comments