You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit edc02af
Browse filesBrowse the repository at this point in the historyBrowse files
feat(node)!: Always report the encoded body size on HTTP spans (#23576)
## What
Always set `http.(request|response).body.size` instead of `.size` and
`.decoded_size` in HTTP server spans. Browser resource spans are
untouched and still report the latter, where the Resource Timing API
measures it directly.
## Why
The `content-length` header always reports the encoded body size, and we
only set the `.decoded_size` attribute when `content-encoding` was
`identity`, i.e. there was no encoding and the "decoded" size would
equal the encoded size. I'd argue that "decoded" or "uncompressed" has
no real meaning and thus value in this case and that we should just
always set `http.request.body.size`.
part of #18895
---------
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: docs/migration/v11-end-state.md
+2Lines changed: 2 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -638,6 +638,8 @@ Legacy HTTP span attributes were replaced by their current semantic-convention e
638
638
639
639
`SanitizedRequestData` — the shape used for `http` breadcrumb data and `http.client` span data — now uses `http.request.method` instead of `http.method` as a key for the request method.
640
640
641
+
On server-side HTTP spans, the `content-length` header is now always reported as `http.request.body.size`/`http.response.body.size` instead of switching to `http.request_body_size_uncompressed` when the no encoding was present.
642
+
641
643
#### Network attributes
642
644
643
645
Network-related span attributes now use the current Sentry semantic conventions, aligned across SDKs. If you query, transform, or alert on the legacy `net.*` fields, update those references:
0 commit comments