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: code-review completed Apr 2, 2026 in 3m 41s

1 issue

code-review: Found 1 issue (1 medium)

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.


Duration: 3m 39s · Tokens: 1.8M in / 24.3k out · Cost: $2.76 (+extraction: $0.00, +fix_gate: $0.00)

Annotations

Check warning on line 126 in sentry_sdk/integrations/_asgi_common.py

See this annotation in the file changed.

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

http.query attribute set to string "None" when no query string present

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.