feat(asgi): Migrate away from event processor in span first #5920
@sentry/warden / warden: find-bugs
completed
Apr 2, 2026 in 5m 34s
1 issue
find-bugs: Found 1 issue (1 low)
Low
capture_items fixture may raise KeyError if span has no attributes - `tests/conftest.py:352-354`
The capture_items fixture unconditionally accesses json["attributes"] (line 353), but _span_batcher._to_transport_format only includes the attributes key when item._attributes is truthy (line 116-119 in _span_batcher.py). While in practice StreamedSpan.end() always sets segment attributes, this creates a fragile dependency on implementation details. If a span somehow ends up without attributes (e.g., through mocking or future code changes), the fixture will raise a KeyError.
Duration: 5m 31s · Tokens: 3.6M in / 30.0k out · Cost: $5.50 (+extraction: $0.00, +fix_gate: $0.00)
Loading