feat(browser): Experimental soft navigation web vitals support - #22880
Draft
logaretm wants to merge 3 commits into
Draft
feat(browser): Experimental soft navigation web vitals support#22880logaretm wants to merge 3 commits into
logaretm wants to merge 3 commits into
Conversation
Re-port of Chrome Soft Navigation web-vitals support onto current develop. Adds an opt-in _experiments.enableSoftNavWebVitals flag on browserTracingIntegration that threads reportSoftNavs through webVitalsIntegration into the vendored web-vitals library and the tracking functions. Soft nav vitals are emitted as v2 spans grouped with the navigation span by trace ID; pageload vitals are unchanged. The vendored library carries the soft-nav port of GoogleChrome/web-vitals#308. Upstream shipped it in v6.0.0 entangled with BFCache handling this fork intentionally removed, so it was adapted onto our BFCache-free v5.1.0 base.
Contributor
size-limit report 📦
|
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 free
to 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.
This PR implements soft navigation support which is pulled from GoogleChrome/web-vitals#308 which entered recently origin trials.
Still need to check how this affects product and how to incorporate the way it works currently with our UI and if that's needed at all.
Links:
How it works
Two ways to turn it on.
Via the tracing integration (forwards the flag when it auto-registers
webVitalsIntegration):Or directly on the web vitals integration:
Once enabled,
reportSoftNavsflows into the vendored web-vitals lib, which re-initializes each metric on a newnavigationIdso LCP/CLS/INP/TTFB/FCP are also captured for soft navigations. Those soft-nav vitals are emitted as v2 spans that group with the navigation span by trace id.closes #17857