Skip to content

feat(attributes): Add browser.navigation.type, move navigation.* to router.navigation.* - #600

Merged
Lms24 merged 1 commit into
mainfrom
awad/browser-navigation-type
Sep 2, 2026
Merged

feat(attributes): Add browser.navigation.type, move navigation.* to router.navigation.*#600
Lms24 merged 1 commit into
mainfrom
awad/browser-navigation-type

Conversation

@logaretm

@logaretm logaretm commented Aug 28, 2026

Copy link
Copy Markdown
Member

Adds browser.navigation.type for web vital spans: navigate, reload, prerender, bfcache, soft-navigation. Mirrors what the web-vitals library reports as navigationType.

Also moves the navigation.* attributes to router.navigation.* so the router's own navigation type stops competing with the browser's. navigation.type, navigation.origin and navigation.route.id are deprecated with plain backfills, and the sveltekit aliases now point at the new names. These are straight renames so there's no transform involved.

The new attribute is going to be used to distinguish the various web vital signals so users can filter out specific (faster) types of navigations.

@github-actions

github-actions Bot commented Aug 28, 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 browser.navigation.type, move navigation.* to router.navigation.* by logaretm in #600
  • Add langchain.chain.name (deprecated) in favor of gen_ai.pipeline.name by RulaKhaled in #599
  • Add browser.paint.type by Lms24 in #606

Names

  • Add browser.* span name and description rules by Lms24 in #607
  • Add cache span name rules by Lms24 in #605

Internal Changes 🔧

  • (descriptions) Fix http.client span description example by Lms24 in #603

🤖 This preview updates automatically when you update the PR.

@logaretm
logaretm force-pushed the awad/browser-navigation-type branch from 599d4ed to 922a1fd Compare August 28, 2026 14:46
@logaretm
logaretm marked this pull request as ready for review August 28, 2026 14:46
@logaretm
logaretm requested review from a team, Lms24, cleptric, mjq and nsdeschenes as code owners August 28, 2026 14:46
@logaretm logaretm changed the title feat(attributes): Add browser.navigation.type and deprecate navigation.type feat(attributes): Add browser.navigation.type, move navigation.* to router.navigation.* Aug 28, 2026

@Lms24 Lms24 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.

Looks good to me!

logaretm added a commit to getsentry/sentry-javascript that referenced this pull request Aug 28, 2026
…red on

Adds `browser.navigation.type` to every emitted LCP, CLS and INP span, so
a vital can be read against the kind of navigation that produced it. A
soft navigation and a cold page load are not comparable measurements, and
without this there is no way to separate them after the fact.

web-vitals reports a wider set of navigation types than the attribute
defines, so only the states Navigation Timing cannot express keep their
own value. Every ordinary document navigation folds into `navigate`,
including a back/forward that missed the bfcache (per the spec) and a
`document.wasDiscarded` restore, which the spec does not name at all.

The `back-forward-cache` -> `bfcache` mapping is included but unreachable
today: `withoutBfcache` drops those metrics before they reach a span.
It's here so that enabling bfcache vitals later doesn't silently report
them as `navigate`.

Spec: getsentry/sentry-conventions#600
logaretm added a commit to getsentry/sentry-javascript that referenced this pull request Aug 31, 2026
…red on

Adds `browser.navigation.type` to every emitted LCP, CLS and INP span, so
a vital can be read against the kind of navigation that produced it. A
soft navigation and a cold page load are not comparable measurements, and
without this there is no way to separate them after the fact.

web-vitals reports a wider set of navigation types than the attribute
defines, so only the states Navigation Timing cannot express keep their
own value. Every ordinary document navigation folds into `navigate`,
including a back/forward that missed the bfcache (per the spec) and a
`document.wasDiscarded` restore, which the spec does not name at all.

The `back-forward-cache` -> `bfcache` mapping is included but unreachable
today: `withoutBfcache` drops those metrics before they reach a span.
It's here so that enabling bfcache vitals later doesn't silently report
them as `navigate`.

Spec: getsentry/sentry-conventions#600
…to `router.navigation.*`

Adds `browser.navigation.type` for the browser-level navigation type reported by
the web-vitals library, and moves the client-side router navigation attributes
into the `router.*` namespace:

- `navigation.type` -> `router.navigation.type`
- `navigation.origin` -> `router.navigation.origin`
- `navigation.route.id` -> `router.navigation.route.id`

The old `navigation.*` attributes are deprecated with backfill, and the
`sentry.sveltekit.navigation.*` deprecations are re-pointed at the new
`router.*` replacements.
@Lms24
Lms24 force-pushed the awad/browser-navigation-type branch from 3ad42dc to 5121053 Compare September 2, 2026 10:56
@Lms24
Lms24 enabled auto-merge (squash) September 2, 2026 10:57
@Lms24
Lms24 merged commit dd7eec5 into main Sep 2, 2026
17 checks passed
@Lms24
Lms24 deleted the awad/browser-navigation-type branch September 2, 2026 11:01
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