Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consider web-vitals ^4.0.0 - INP tracking reports node names for un-mounted nodes (Currently ^3.1.0 / Locked to 3.5.1) #1053

Closed
steven-hoffman-jomashop opened this issue May 28, 2024 · 3 comments
Labels
enhancement New feature or request

Comments

@steven-hoffman-jomashop

Summary

Upgrading to web-vitals version 4.0.0 would help with INP metrics.
Currently, INP metrics can be reported with a 'blank' eventTarget.
(Web vitals reports INP on hide/unmount of the page, by then the element contributing to the largest INP might have been removed).

Web vitals v4.0.0 includes code to track these elements and is able to report the element's name even when the element is removed.
See: https://github.com/GoogleChrome/web-vitals/blob/v4.0.1/CHANGELOG.md?plain=1#L18 /GoogleChrome/web-vitals#477.

Desired Behavior

Use web-vitals v4.0.0 to report INP eventTarget.

Possible Solution

Update to v4.0.0.
(Current lock file value is 3.5.1: https://github.com/newrelic/newrelic-browser-agent/blob/v1.260.1/package-lock.json#L23210)

Also, 3.5.2 appears to contain a mitigation for this issue as well. (See: https://github.com/GoogleChrome/web-vitals/blob/v4.0.1/CHANGELOG.md?plain=1#L24)

  • Maybe update to 3.5.2 while evaluating 4.0.0.

Additional context

Note: v4.0.0 contains breaking changes to the metric format which would require either:

  • A breaking change in the PageViewTiming name for NewRelic users
  • Transforming the metric to continue to use the older/existing names.
    (Other breaking changes are noted in the release notes)
@steven-hoffman-jomashop steven-hoffman-jomashop added the enhancement New feature or request label May 28, 2024
@workato-integration
Copy link

@metal-messiah
Copy link
Member

We will be upgrading to @4.x in an upcoming agent release. Thanks for suggesting this.

@steven-hoffman-jomashop
Copy link
Author

Sounds good.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants