Uh oh!
There was an error while loading. Please reload this page.
feat!: Replace the deprecated http.target span attribute - #23575
Merged
Conversation
Contributor
size-limit report 📦
|
msonnbforce-pushed
the
ms/http-attrs-target
branch
from
August 25, 2026 13:07
f6e86e3 to
2b3f570Comparemsonnbforce-pushed
the
ms/http-attrs-target
branch
2 times, most recently
from
August 25, 2026 14:01
ecc2aa5 to
4984f8cComparemsonnbforce-pushed
the
ms/http-attrs-target
branch
from
August 25, 2026 14:39
4984f8c to
92af4c4Comparemsonnb
commented
Aug 25, 2026
MemberAuthor
bugbot run |
http.target span attributehttp.target span attributeThere 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 92af4c4. Configure here.
msonnb
marked this pull request as ready for review
August 25, 2026 14:44
msonnb
requested review from
chargome, isaacs and mydea
and removed request for
a teamAugust 25, 2026 14:44
msonnbforce-pushed
the
ms/http-attrs-target
branch
2 times, most recently
from
August 25, 2026 14:52
c0f52f9 to
e71bd7aComparelogaretm
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>
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>
Part of the v11 migration away from attributes `@sentry/conventions` marks deprecated. Stacked on the `http.*` renames. `http.target` carried the pathname *and* the query, while `url.path` is the pathname only. The core server span set neither `url.query` nor `url.fragment`, so dropping `http.target` would have lost the query — it now sets both, which the node server span already did. Consumers that matched on `http.target` were repointed at `url.path`: the react-router low-quality-transaction filter and the TanStack Start tunnel-route filter, both `ignoreSpans` rules against our own spans that would otherwise have silently stopped matching. The Next.js readers keep `http.target` as a fallback behind a `url.path` primary, since they also see spans from a user's own OpenTelemetry instrumentation. All other read-side fallbacks are untouched for the same reason. `no-unfiltered-url-attributes` no longer guards `http.target`: nothing sets it, and its replacement `url.path` is a bare pathname with no query to filter. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
msonnbforce-pushed
the
ms/http-attrs-target
branch
from
August 26, 2026 07:26
e71bd7a to
fc3aaaaCompareUh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
JPeer264 added a commit
to getsentry/sentry-conventions
that referenced
this pull request
Aug 27, 2026
…ery` `http.target` carried the path, the query string and the fragment in one value, so it cannot be renamed onto a single replacement. v11 of the JavaScript SDK splits it into `url.path`, `url.query` and `url.fragment`. Adds the `http_target_to_url_path_and_query` transformation and sets `http.target` to `_status: "transform"`. No aliases are added on purpose: an alias group is symmetric, so aliasing `http.target` to both `url.path` and `url.query` would declare those two equivalent to each other. Replaced by getsentry/sentry-javascript#23575 Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
JPeer264 added a commit
to getsentry/sentry-conventions
that referenced
this pull request
Aug 27, 2026
…ery` `http.target` carried the path, the query string and the fragment in one value, so it cannot be renamed onto a single replacement. v11 of the JavaScript SDK splits it into `url.path`, `url.query` and `url.fragment`. Adds the `http_target_to_url_path_and_query` transformation and sets `http.target` to `_status: "transform"`. No aliases are added on purpose: an alias group is symmetric, so aliasing `http.target` to both `url.path` and `url.query` would declare those two equivalent to each other. Replaced by getsentry/sentry-javascript#23575 Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
JPeer264 added a commit
to getsentry/sentry-conventions
that referenced
this pull request
Aug 28, 2026
`http.target` holds the path, the query string and the fragment in one value. v11 of the JavaScript SDK splits it into `url.path`, `url.query` and `url.fragment`. The deprecation stays `_status: null` and drops the `replacement` field, because there is no single replacement. The three replacements are named in the reason instead. No aliases are added on purpose. An alias group is symmetric, so aliasing `http.target` to both `url.path` and `url.query` would declare those two equivalent to each other. Replaced by getsentry/sentry-javascript#23575 Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
JPeer264 added a commit
to getsentry/sentry-conventions
that referenced
this pull request
Aug 28, 2026
`http.target` holds the path, the query string and the fragment in one value. v11 of the JavaScript SDK splits it into `url.path`, `url.query` and `url.fragment`. The deprecation stays `_status: null` and drops the `replacement` field, because there is no single replacement. The three replacements are named in the reason instead. No aliases are added on purpose. An alias group is symmetric, so aliasing `http.target` to both `url.path` and `url.query` would declare those two equivalent to each other. Replaced by getsentry/sentry-javascript#23575 Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
JPeer264 added a commit
to getsentry/sentry-conventions
that referenced
this pull request
Aug 28, 2026
…et` (#587) `http.target` holds the path, the query string and the fragment in one value. v11 of the JavaScript SDK splits it into `url.path`, `url.query` and `url.fragment`. The deprecation stays `_status: null` and drops the `replacement` field, because there is no single replacement. The three replacements are named in the reason instead. No aliases are added on purpose. An alias group is symmetric, so aliasing `http.target` to both `url.path` and `url.query` would declare those two equivalent to each other. Replaced by getsentry/sentry-javascript#23575 Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
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 freeto 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.
Replaces the deprecated
http.targetspan attribute withurl.pathandurl.query.Consumers that matched on
http.targetTwo
ignoreSpansrules match spans that the SDK itself emits now match onurl.path:@sentry/react-router@sentry/tanstackstart-reactThe readers in
@sentry/nextjsstill readhttp.target, but only after they readurl.path. These readers also receive spans from an OpenTelemetry instrumentation that the user set up, and that instrumentation still emits the old attributes. Every other read-side fallback stays for the same reason.no-unfiltered-url-attributesThis lint rule no longer guards
http.target. The SDK no longer sets it, and its replacementurl.pathholds a pathname without a query, so there is nothing to filter.part of #18895