Skip to content

dont set on scope

86fd48a
Select commit
Loading
Failed to load commit list.
Merged

feat(wsgi): Migrate to span first #5988

dont set on scope
86fd48a
Select commit
Loading
Failed to load commit list.
@sentry/warden / warden: find-bugs completed Apr 13, 2026 in 3m 53s

1 issue

find-bugs: Found 1 issue (1 high)

High

Span class lacks set_attribute method used in non-streaming mode - `sentry_sdk/integrations/wsgi.py:167`

When span_streaming is False (line 146), the code uses sentry_sdk.start_transaction() which returns a Transaction (extends Span). On line 167, span.set_attribute() is called, but the Span/Transaction classes only have set_data() and set_tag() methods, not set_attribute(). This method only exists on StreamedSpan. The call will raise AttributeError, causing request attributes to never be set on non-streaming spans.


Duration: 3m 51s · Tokens: 2.1M in / 17.6k out · Cost: $3.37 (+extraction: $0.00, +merge: $0.00)

Annotations

Check failure on line 167 in sentry_sdk/integrations/wsgi.py

See this annotation in the file changed.

@sentry-warden sentry-warden / warden: find-bugs

Span class lacks set_attribute method used in non-streaming mode

When `span_streaming` is False (line 146), the code uses `sentry_sdk.start_transaction()` which returns a `Transaction` (extends `Span`). On line 167, `span.set_attribute()` is called, but the `Span`/`Transaction` classes only have `set_data()` and `set_tag()` methods, not `set_attribute()`. This method only exists on `StreamedSpan`. The call will raise `AttributeError`, causing request attributes to never be set on non-streaming spans.