feat!: Rename deprecated http.* span attributes - #23574
Merged
Merged
Conversation
Contributor
size-limit report 📦
|
msonnb
force-pushed
the
ms/http-attrs-renames
branch
from
August 25, 2026 13:07
b92dd71 to
bfbde2e
Compare
msonnb
commented
Aug 25, 2026
| [NETWORK_TRANSPORT]: transport, | ||
| 'http.status_text': statusMessage?.toUpperCase(), | ||
| 'http.status_code': statusCode, | ||
| 'http.response.status_text': statusMessage?.toUpperCase(), |
Member
Author
There was a problem hiding this comment.
plain string for now because it's not yet released in conventions (applies to some others too)
msonnb
force-pushed
the
ms/http-attrs-renames
branch
3 times, most recently
from
August 25, 2026 14:39
eb4bed3 to
55c7f43
Compare
Member
Author
|
bugbot run |
There was a problem hiding this comment.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit 55c7f43. Configure here.
http.* span attributeshttp.* span attributes
msonnb
marked this pull request as ready for review
August 25, 2026 14:43
msonnb
requested review from
JPeer264,
Lms24,
chargome,
isaacs,
logaretm and
nicohrubec
and removed request for
a team
August 25, 2026 14:43
msonnb
force-pushed
the
ms/http-attrs-renames
branch
from
August 25, 2026 14:46
55c7f43 to
0e26120
Compare
logaretm
approved these changes
Aug 25, 2026
Part of the v11 migration away from attributes `@sentry/conventions` marks deprecated. This PR covers the renames on HTTP spans, all of them 1:1 with no behavior change. `http.target` and the Node body size behavior change follow in stacked PRs; the `net.*` attributes are migrated separately in #23301. `http.method` -> `http.request.method`, `http.status_code` -> `http.response.status_code`, `http.status_text` -> `http.response.status_text`, `http.scheme` -> `url.scheme`, `http.user_agent` -> `user_agent.original`, `http.request_content_length` -> `http.request.body.size`, `http.request_content_length_uncompressed` -> `http.request.body.decoded_size`, `http.response_content_length` -> `http.response.body.size`, `http.response_content_length_uncompressed` and `http.decoded_response_content_length` -> `http.response.body.decoded_size`, `http.response_transfer_size` -> `http.response.size`, and `url.same_origin` -> `http.request.same_origin`. The last two legacy response body size names meant the same thing — the decoded response body size. Node HTTP spans used `http.response_content_length_uncompressed`, browser resource spans used `http.decoded_response_content_length`. Which of the encoded and decoded attribute an HTTP span sets is unchanged here: the code still branches on whether a `content-encoding` header is present. That branching is what the stacked body size PR addresses. `http.host`, `http.flavor` and `http.client_ip` are dropped without a replacement being set here. Their replacements — `server.address`, `network.protocol.version` and `client.address` — are introduced by #23301, so setting them here too would mean two PRs writing the same keys with different values. `SanitizedRequestData`, the shape backing `http` breadcrumb data, now keys the method as `http.request.method`. Span attributes in the touched files are now imported from `@sentry/conventions/attributes` rather than written as string literals. That is what surfaced `url.same_origin` as deprecated; as a literal it was invisible. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
msonnb
force-pushed
the
ms/http-attrs-renames
branch
from
August 26, 2026 07:26
0e26120 to
3e703b8
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR covers the 1:1 renames and removals on HTTP spans.
http.targetand the Node body size behavior change follow in stacked PRs.http.methodhttp.request.methodhttp.status_codehttp.response.status_codehttp.status_texthttp.response.status_texthttp.schemeurl.schemehttp.user_agentuser_agent.originalhttp.request_content_lengthhttp.request.body.sizehttp.request_content_length_uncompressedhttp.request.body.decoded_sizehttp.response_content_lengthhttp.response.body.sizehttp.response_content_length_uncompressedhttp.response.body.decoded_sizehttp.decoded_response_content_lengthhttp.response.body.decoded_sizehttp.response_transfer_sizehttp.response.sizeurl.same_originhttp.request.same_originhttp.host,http.flavorandhttp.client_ipare dropped without a replacement being set here. Their replacements (server.address,network.protocol.versionandclient.address) are already being set (introduced in #23301).part of #18895