Skip to content

feat(attributes): Deprecate http.query and http.fragment in favour of url.query and url.fragment - #539

Open
Lms24 wants to merge 2 commits into
mainfrom
lms/feat-attr-depr-http.query,fragment
Open

feat(attributes): Deprecate http.query and http.fragment in favour of url.query and url.fragment#539
Lms24 wants to merge 2 commits into
mainfrom
lms/feat-attr-depr-http.query,fragment

Conversation

@Lms24

@Lms24 Lms24 commented Jul 27, 2026

Copy link
Copy Markdown
Member

Description

These attributes are ambiguous and have slightly different semantics:

  • http.query and http.fragment require a leading ?/# and are not defined by OTel
  • url.query and url.fragment require no leading delimiters and are defined by OTel.

This PR deprecates the http.* variants.

Open to decide: Should we backfill or transform the attributes? The change in semantics makes this a bit more cumbersome. A simpler option would be to set status null.

PR Checklist

  • I have run yarn test and verified that the tests pass.
  • I have run yarn generate to generate and format code and docs.

If an attribute was added:

  • The attribute is in a namespace (e.g. nextjs.function_id, not function_id)
  • I have used the correct value for apply_scrubbing (i.e. manual or auto. Use never only for values that should never be scrubbed such as IDs)

If an attribute was deprecated:

@github-actions

Copy link
Copy Markdown

Semver Impact of This PR

🟡 Minor (new features)

📋 Changelog Preview

This is how your changes will appear in the changelog.
Entries from this PR are highlighted with a left border (blockquote style).


New Features ✨

Attributes

  • Deprecate http.query and http.fragment in favour of url.query and url.fragment by Lms24 in #539
  • Add django.middleware_name (deprecated) in favor of middleware.name by alexander-alderman-webb in #520
  • Add starlite.middleware_name (deprecated) in favor of middleware.name by alexander-alderman-webb in #519
  • Add aws.request.url (deprecated) in favor of url.full by sentrivana in #488
  • Add subprocess.pid (deprecated) in favor of process.pid by sentrivana in #487
  • Add litestar.middleware_name (deprecated) in favor of middleware.name by sentrivana in #486
  • Add starlette.middleware_name (deprecated) in favor of middleware.name by sentrivana in #485
  • Add redis.key (deprecated) in favor of db.redis.key by sentrivana in #484
  • Add db.mongodb.collection (deprecated) in favor of db.collection.name by sentrivana in #483
  • Add Kafka messaging attributes by chargome in #474
  • Deprecate rpc.grpc.status_code in favor of rpc.response.status_code by lucas-zimerman in #494
  • Add deprecated messaging.destination_kind by andreiborza in #509
  • Add sentry.segment.name.source attribute by Lms24 in #466
  • Add attribute transformations by constantinius in #465
  • Add stable app vitals attributes by buenaflor in #493
  • Deprecate sentry.frames.* attributes by buenaflor in #500
  • Add missing AI legacy aliases from Relay SpanData by vgrozdanic in #498

Other

  • (conventions) Support multiple examples by Lms24 in #505
  • (descriptions) Add http.route description template for http.server span description inference by Lms24 in #518

Internal Changes 🔧

Attribute

  • Add more examples for valid sentry.kind values by Lms24 in #517
  • Improve db.statement example and add deprecation reason by Lms24 in #501

Attributes

  • Improve description of sentry.segment.name.source by Lms24 in #511
  • Deprecate sentry.span.source and change backfill status of sentry.source by Lms24 in #510

Deps

  • Bump dompurify from 3.4.11 to 3.4.12 by dependabot in #525
  • Bump fast-uri from 3.1.2 to 3.1.4 by dependabot in #526
  • Bump svgo from 4.0.1 to 4.0.2 by dependabot in #524
  • Bump js-yaml from 4.2.0 to 4.3.0 by dependabot in #516
  • Bump astro from 6.4.7 to 7.1.0 in /docs by dependabot in #514

Other

  • (attrs) Backport attributes and normalizations from Relay by Dav1dde in #497
  • (codeowners) Assign telemetry-experience to gen_ai/ai attributes by vgrozdanic in #506
  • (deps-dev) Bump tar from 7.5.16 to 7.5.19 by dependabot in #515
  • (release) Show version in workflow run title by constantinius in #504

🤖 This preview updates automatically when you update the PR.

},
"deprecation": {
"_status": "backfill",
"replacement": "url.fragment"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Backfill ignores value format mismatch

High Severity

http.fragment and http.query use deprecation _status of backfill, which copies values as-is to url.fragment and url.query. Those pairs are not value-compatible: the http.* attributes include a leading # or ?, while the url.* attributes do not. Per CONTRIBUTING, incompatible values need _status: "transform" and an attribute transformation, or ingestion will write incorrect url.* values.

Additional Locations (1)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit ef645c3. Configure here.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, that's correct. Still need to decide what to do

@Lms24
Lms24 marked this pull request as ready for review July 27, 2026 11:07
@Lms24
Lms24 requested review from a team, cleptric, mjq and nsdeschenes as code owners July 27, 2026 11:07

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

There are 2 total unresolved issues (including 1 from previous review).

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit b25bbcc. Configure here.

"_status": "backfill",
"replacement": "url.query",
"reason": "`url.query` is supported by OTel and conceptually more fitting."
},

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Backfill ignores value format mismatch

High Severity

deprecation._status is set to backfill for http.query and http.fragment, but those values include a leading ?/# while url.query and url.fragment must not. Backfill copies values as-is, so ingest would write OTel-invalid replacements. Per CONTRIBUTING, incompatible values need transform or _status: null.

Additional Locations (1)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit b25bbcc. Configure here.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment on lines +9 to +13
"deprecation": {
"_status": "backfill",
"replacement": "url.query",
"reason": "`url.query` is supported by OTel and conceptually more fitting."
},

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: The deprecation status for http.query and http.fragment should be "transform" instead of "backfill" to handle semantic differences with their url.* replacements.
Severity: MEDIUM

Suggested Fix

Change the _status from "backfill" to "transform" for http.query and http.fragment. Create a corresponding transformation document to strip the leading ? and # characters from the values before assigning them to url.query and url.fragment.

Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent. Verify if this is a real issue. If it is, propose a fix; if not, explain why it's
not valid.

Location: model/attributes/http/http__query.json#L9-L13

Potential issue: The deprecation status for `http.query` and `http.fragment` is
incorrectly set to `"backfill"`. This status implies a direct copy of the value to the
new attributes, `url.query` and `url.fragment`. However, the old attributes contain a
leading `?` or `#` character, while the new attributes should not. This direct copy will
result in semantically incorrect data for the new attributes. The contribution
guidelines state that a `"transform"` status should be used when a value cannot be
copied directly, which is the case here.

Also affects:

  • model/attributes/http/http__fragment.json:8~12

Did we get this right? 👍 / 👎 to inform future reviews.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant