Skip to content

span status test

acc7126
Select commit
Loading
Failed to load commit list.
Merged

ref: Support outgoing trace propagation in span first (18) #5638

span status test
acc7126
Select commit
Loading
Failed to load commit list.
@sentry/warden / warden: code-review completed Mar 16, 2026 in 6m 44s

1 issue

code-review: Found 1 issue (1 high)

High

AttributeError when set_span_errored is called on NoOpStreamedSpan - `sentry_sdk/tracing_utils.py:1122`

When set_span_errored is called on a NoOpStreamedSpan, accessing span._segment at line 1122 will raise an AttributeError. NoOpStreamedSpan.__init__ (traces.py:538-548) does not call the parent StreamedSpan.__init__, so the _segment slot attribute is never initialized. Since _segment is defined in StreamedSpan.__slots__, accessing it without initialization raises AttributeError: '_segment'.


Duration: 6m 42s · Tokens: 4.8M in / 58.4k out · Cost: $6.06 (+extraction: $0.00, +fix_gate: $0.00)

Annotations

Check failure on line 1122 in sentry_sdk/tracing_utils.py

See this annotation in the file changed.

@sentry-warden sentry-warden / warden: code-review

AttributeError when set_span_errored is called on NoOpStreamedSpan

When `set_span_errored` is called on a `NoOpStreamedSpan`, accessing `span._segment` at line 1122 will raise an `AttributeError`. `NoOpStreamedSpan.__init__` (traces.py:538-548) does not call the parent `StreamedSpan.__init__`, so the `_segment` slot attribute is never initialized. Since `_segment` is defined in `StreamedSpan.__slots__`, accessing it without initialization raises `AttributeError: '_segment'`.