-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(browser-utils): Update
web-vitals
to v4.2.4 (#14439)
Update the vendored `web-vitals` library from [3.5.2 to 4.2.4](https://github.com/GoogleChrome/web-vitals/blob/main/CHANGELOG.md) Some noteable `web-vitals` changes: - breaking type changes (version 4.0.0) - INP fixes and code refactors - minor LCP fix for web vitals library being late-initialized. I don't think this applies to us but who knows... Further changes from our end: - The `onHidden` utility function was NOT updated to 4.2.4 due to the new version no longer triggering correctly for Safari 12.1-14.0 (which we [still support](https://docs.sentry.io/platforms/javascript/troubleshooting/supported-browsers/)). More details in the code comment - Added an optional param to `getNavigationEntry` since ww 4.2.4 only returns the entry if the `responseStart` time value is plausible. This is a good change for the library but since we also use the function to create other spans and attributes, I opted to leave things as they are for these use cases by passing in the flag to skip the plausibility check. This seems to be primarily a problem with Safari, which reports `responseStart: 0` sometimes. - Continued to add checks for the existence of `WINDOW.document` which `web-vitals` assumes to be present - Continued to add `longtask` to the array of available types in the `observe` function
- Loading branch information
Showing
26 changed files
with
443 additions
and
375 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.