Skip to content

feat(attributes): Add url.same_origin (deprecated) and http.request.same_origin (replacement) attributes#456

Open
Lms24 wants to merge 1 commit into
mainfrom
lms/feat-attr-add-url.same_origin
Open

feat(attributes): Add url.same_origin (deprecated) and http.request.same_origin (replacement) attributes#456
Lms24 wants to merge 1 commit into
mainfrom
lms/feat-attr-add-url.same_origin

Conversation

@Lms24

@Lms24 Lms24 commented Jun 30, 2026

Copy link
Copy Markdown
Member

Adds two attributes:

  • url.same_origin: Sent today by the browser SDK, indicating that the url is made to the same origin the page is currently on. While valuable information, the url namespace doesn't fit this information, since it's a property of the request, not the url itself (h/t @mjq for pointing this out). Therefore this attribute will be marked as deprecated.
  • http.request.same_origin: Therefore replaces url.same_origin, which we'll also start using in the SDK in v11.

@github-actions

github-actions Bot commented Jun 30, 2026

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) Add url.same_origin (deprecated) and http.request.same_origin (replacement) attributes by Lms24 in #456

🤖 This preview updates automatically when you update the PR.

@Lms24 Lms24 self-assigned this Jun 30, 2026
@Lms24 Lms24 marked this pull request as ready for review June 30, 2026 11:49
@Lms24 Lms24 requested review from a team, cleptric, mjq and nsdeschenes as code owners June 30, 2026 11:49
Comment thread model/attributes/url/url__same_origin.json Outdated

@mjq mjq left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Semantically I'm not sure this is a property of the URL, rather than e.g. the request as a whole - I'd consider http.request.same_origin personally - but my LOGAF is low and it looks like this is an attribute we're already sending so probably not worth changing now 👍

@Lms24

Lms24 commented Jul 1, 2026

Copy link
Copy Markdown
Member Author

it looks like this is an attribute we're already sending so probably not worth changing now

yes, it's already being sent. I'm happy to deprecate this one and migrate to the request one in the next SDK major. Fully agree that scoping this information to the request is more correct. Thanks for raising!

UPDATE: Adjusted the PR to include both attributes and deprecate the url one

…ame_origin`

Add `http.request.same_origin` as the canonical attribute and deprecate
`url.same_origin` in its favor. Both attributes carry cross-aliases and the
deprecated one points to the replacement via `deprecation.replacement`.

Co-authored-by: Cursor <cursoragent@cursor.com>
@Lms24 Lms24 force-pushed the lms/feat-attr-add-url.same_origin branch from 4a87027 to 28af264 Compare July 1, 2026 08:05
@Lms24 Lms24 changed the title feat(attributes): Add url.same_origin attribute feat(attributes): Add url.same_origin (deprecated) and http.request.same_origin (replacement) attributes Jul 1, 2026
Comment thread javascript/sentry-conventions/src/attributes.ts
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.

2 participants