Skip to content

Catch any raised exceptions from the serialization json.dumps call an…

48415ad
Select commit
Loading
Failed to load commit list.
Merged

feat(starlette): Support span streaming #6123

Catch any raised exceptions from the serialization json.dumps call an…
48415ad
Select commit
Loading
Failed to load commit list.
@sentry/warden / warden completed Apr 27, 2026 in 1m 3s

1 issue

Medium

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

In the streaming branch of _start_middleware_span, the attribute key is set to middleware.name, while the legacy (non-streaming) branch sets a starlette.middleware_name tag. The PR description explicitly states that the streaming path should send starlette.middleware_name as an attribute. This inconsistency means downstream consumers/queries that filter on starlette.middleware_name will not match streamed spans, breaking parity between the streaming and legacy paths.

4 skills analyzed
Skill Findings Duration Cost
code-review 0 58.6s $1.48
find-bugs 1 37.5s $1.15
skill-scanner 0 46.9s $0.70
security-review 0 23.7s $1.14

Duration: 2m 47s · Tokens: 712.5k in / 4.3k out · Cost: $4.49 (+dedup: $0.01)