Skip to content

merge master

bc1f32d
Select commit
Loading
Failed to load commit list.
Merged

feat(stdlib): Support span streaming #6154

merge master
bc1f32d
Select commit
Loading
Failed to load commit list.
@sentry/warden / warden: find-bugs completed Apr 29, 2026 in 1m 18s

1 issue

find-bugs: Found 1 issue (1 low)

Low

Streaming branch picks first span instead of last, may select wrong span for header assertion - `tests/integrations/stdlib/test_httplib.py:271`

In the streaming branch, request_span = next(item.payload for item in items if item.type == "span") returns the FIRST span emitted, while the non-streaming branch explicitly uses event["spans"][-1] (the LAST span, typically the HTTP request child span). If both the parent span and the HTTP child span are emitted as items, the streaming path may capture the parent span's id instead of the HTTP request span's id, causing expected_sentry_trace's parent_span_id to mismatch the value actually used in the outgoing sentry-trace header.

Also found at:

  • tests/integrations/stdlib/test_httplib.py:360

Duration: 1m 16s · Tokens: 371.4k in / 4.4k out · Cost: $2.26 (+merge: $0.00)