Skip to content

span_context

3142247
Select commit
Loading
Failed to load commit list.
Sign in for the full log view
Merged

ref: Add support for custom sampling context to span first (14) #5628

span_context
3142247
Select commit
Loading
Failed to load commit list.
GitHub Actions / warden completed Mar 11, 2026 in 3m 48s

1 issue

Low

Custom sampling context can overwrite span_context - `sentry_sdk/tracing_utils.py:1434`

The sampling_context.update(propagation_context.custom_sampling_context) call on line 1434 can overwrite the SDK-constructed span_context key if a user or integration provides custom_sampling_context containing a span_context key. This could lead to loss of span information (name, trace_id, parent_span_id, parent_sampled, attributes) in the traces_sampler callback, potentially causing incorrect sampling decisions.

4 skills analyzed
Skill Findings Duration Cost
code-review 0 2m 13s $1.48
find-bugs 1 3m 43s $3.35
skill-scanner 0 2m 11s $0.45
security-review 0 1m 27s $1.11

Duration: 9m 34s · Tokens: 3.1M in / 29.5k out · Cost: $6.39 (+extraction: $0.00, +fix_gate: $0.00)