Skip to content

Merge branch 'master' into ivana/migrate-asgi-event-processor

a39337b
Select commit
Loading
Failed to load commit list.
Draft

feat(asgi): Migrate away from event processor in span first #5920

Merge branch 'master' into ivana/migrate-asgi-event-processor
a39337b
Select commit
Loading
Failed to load commit list.
@sentry/warden / warden completed Apr 2, 2026 in 7m 53s

2 issues

Medium

http.query attribute set to string "None" when no query string present - `sentry_sdk/integrations/_asgi_common.py:126`

When there's no query string in the request, _get_query(asgi_scope) returns None, which is unconditionally assigned to attributes["http.query"]. When this None value is later passed through format_attribute() in set_attribute(), it becomes the string "None" via safe_repr(). This causes requests without query strings to have http.query set to the literal string "None" instead of omitting the attribute entirely.

Custom span names may be unconditionally overwritten for StreamedSpan - `sentry_sdk/integrations/asgi.py:369-371`

The finally block at lines 369-371 unconditionally sets the span name and source from _get_segment_name_and_source() without checking if a custom name/source was already set by the application (e.g., via set_transaction_name()). This contrasts with the event_processor method (lines 385-400) which has an already_set check that respects custom sources (COMPONENT, ROUTE, CUSTOM). This could cause applications that set custom transaction names to have them overwritten with URL-derived names.

4 skills analyzed
Skill Findings Duration Cost
code-review 1 3m 39s $2.75
find-bugs 1 7m 43s $5.60
skill-scanner 0 3m 47s $0.51
security-review 0 2m 56s $0.56

Duration: 18m 5s · Tokens: 6.6M in / 63.5k out · Cost: $9.45 (+extraction: $0.01, +fix_gate: $0.01, +dedup: $0.01)