Skip to content

Remove metadata returned from serialization of body data method, whos…

3ae7b8a
Select commit
Loading
Failed to load commit list.
Merged

feat(starlette): Support span streaming #6123

Remove metadata returned from serialization of body data method, whos…
3ae7b8a
Select commit
Loading
Failed to load commit list.
@sentry/warden / warden: find-bugs completed Apr 28, 2026 in 1m 4s

1 issue

find-bugs: Found 1 issue (1 medium)

Medium

Streaming middleware span uses 'middleware.name' attribute instead of 'starlette.middleware_name' - `sentry_sdk/integrations/starlette.py:178`

Under span streaming, _start_middleware_span sets the attribute key middleware.name, but the legacy non-streaming path (and the PR description) uses the tag key starlette.middleware_name. This inconsistency means consumers/queries that filter by starlette.middleware_name will not match streaming spans, breaking parity with the existing transaction-based path that this PR claims to preserve.


Duration: 1m 4s · Tokens: 208.0k in / 2.0k out · Cost: $0.97 (+extraction: $0.00)

Annotations

Check warning on line 178 in sentry_sdk/integrations/starlette.py

See this annotation in the file changed.

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

Streaming middleware span uses 'middleware.name' attribute instead of 'starlette.middleware_name'

Under span streaming, `_start_middleware_span` sets the attribute key `middleware.name`, but the legacy non-streaming path (and the PR description) uses the tag key `starlette.middleware_name`. This inconsistency means consumers/queries that filter by `starlette.middleware_name` will not match streaming spans, breaking parity with the existing transaction-based path that this PR claims to preserve.