feat(httpx): Migrate to span first #6084
+729
−139
Open
@sentry/warden / warden: code-review
completed
Apr 16, 2026 in 4m 1s
1 issue
code-review: Found 1 issue (1 medium)
Medium
Missing 'reason' attribute in span streaming path causes data loss - `sentry_sdk/integrations/httpx.py:99-104`
The new span streaming code path (lines 99-109) does not include the HTTP reason phrase (rv.reason_phrase) in the span attributes. The legacy path at line 145 sets span.set_data("reason", rv.reason_phrase), but the streaming path only sets status and HTTP_STATUS_CODE. This means users migrating to span streaming will lose the reason phrase data from their HTTP client spans.
Duration: 3m 58s · Tokens: 2.4M in / 24.7k out · Cost: $3.20 (+extraction: $0.00, +fix_gate: $0.00)
Annotations
Check warning on line 104 in sentry_sdk/integrations/httpx.py
sentry-warden / warden: code-review
Missing 'reason' attribute in span streaming path causes data loss
The new span streaming code path (lines 99-109) does not include the HTTP reason phrase (`rv.reason_phrase`) in the span attributes. The legacy path at line 145 sets `span.set_data("reason", rv.reason_phrase)`, but the streaming path only sets status and `HTTP_STATUS_CODE`. This means users migrating to span streaming will lose the reason phrase data from their HTTP client spans.
Loading