You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
docs: Note the soft navigation web vitals behaviour changes
Web vitals values shift on upgrade for apps that do client-side routing:
page load vitals are now finalized at the first soft navigation instead of
accumulating over the page lifetime, and CLS/LCP no longer report every
intermediate update, which changes what Session Replay records.
Copy file name to clipboardExpand all lines: MIGRATION.md
+28Lines changed: 28 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -575,6 +575,34 @@ Sentry.init({
575
575
});
576
576
```
577
577
578
+
### Web vitals are reported per soft navigation
579
+
580
+
Affected SDKs: All SDKs running in the browser.
581
+
582
+
`webVitalsIntegration` (auto-registered by `browserTracingIntegration`) now reports its own set of LCP, CLS and INP for every soft navigation the browser detects through the [Soft Navigations API](https://developer.chrome.com/docs/web-platform/soft-navigations-experiment), attributed to the navigation span it belongs to.
583
+
584
+
This also changes how the initial page load is measured. Previously a page reported a single set of vitals that accumulated over the whole page lifetime. Now the page load's vitals are finalized at the first soft navigation, so **expect the values reported for page loads to drop** on apps that do client-side routing, most noticeably for CLS and INP. Aggregates such as p75s will shift after upgrading.
585
+
586
+
Reporting per soft navigation requires span streaming (`traceLifecycle: 'stream'`, the default) and is ignored in browsers without support for the Soft Navigations API (Chromium 151+). Navigations the browser does not detect as soft navigations (programmatic navigations, navigations that never paint) report no vitals at all, so coverage is lower than for page loads.
587
+
588
+
To keep the previous behaviour of one set of vitals for the whole page lifetime:
### CLS and LCP no longer report intermediate values
597
+
598
+
Affected SDKs: All SDKs running in the browser.
599
+
600
+
With soft navigation reporting enabled (the default, see above), the SDK no longer subscribes to every intermediate CLS and LCP update. `web-vitals` reports once per navigation, with the final value.
601
+
602
+
This is required for per-navigation values to be correct: `web-vitals` skips any report with a zero delta, including the forced report at a navigation boundary, so subscribing to all changes means the page load never receives its final value.
603
+
604
+
The visible effect is in Session Replay, which records `web-vital` breadcrumbs from the same instrumentation. Replays now contain one LCP and one CLS entry per navigation instead of one per intermediate update. Where soft navigation reporting is disabled or unsupported, the previous behaviour is unchanged.
0 commit comments