feat(starlette): Support span streaming #6123
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
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.