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

feat: Upgrade to web-vitals v4 #1193

Merged
merged 9 commits into from
Sep 23, 2024
Merged

feat: Upgrade to web-vitals v4 #1193

merged 9 commits into from
Sep 23, 2024

Conversation

ptang-nr
Copy link
Contributor

@ptang-nr ptang-nr commented Sep 18, 2024

Upgrade to web-vitals v4. For more info, please see https://github.com/GoogleChrome/web-vitals/blob/main/docs/upgrading-to-v4.md.

Overview

In this PR, we are upgrading to current latest web-vitals lib (v4.2.3) following the web-vitals upgrade doc.

Notable changes:

INP

  • eventType is renamed to interactionType to avoid keyword conflict within NR
  • Add interaction* equivalents for other event* attrs in use
    • event* attrs are preserved for backwards compatibility to be EOL'd at a later time

LCP

  • Add resourceLoadTime as replacement for resourceLoadDuration
    • resourceLoadDuration is preserved for backwards compatibility to be EOL'd at a later time

Related Issue(s)

https://new-relic.atlassian.net/browse/NR-296095

Testing

Relevant web-vital unit tests + PVT integration tests

Old `event*` attrs are preserved to ease v3 to v4 transition for customers/any internal refs. The only exception is `eventType`, which is replaced due to being a reserved keyword in NRDB.
Note: interactionTargetElement, processedEventEntries, and longAnimationFrameEntries are excluded.
Copy link

github-actions bot commented Sep 18, 2024

Asset Size Report

Merging this pull request will result in the following asset size changes:

Agent Asset Previous Size New Size Diff
lite loader 30.66 kB / 11.09 kB (gzip) 30.66 kB / 11.09 kB (gzip) 0% / 0.01% (gzip)
lite async-chunk 49.17 kB / 16 kB (gzip) 51.5 kB / 16.72 kB (gzip) 4.74% / 4.49% (gzip)
pro loader 51.3 kB / 17.71 kB (gzip) 51.3 kB / 17.71 kB (gzip) 0% / 0.01% (gzip)
pro async-chunk 95.62 kB / 28.92 kB (gzip) 97.95 kB / 29.64 kB (gzip) 2.44% / 2.47% (gzip)
spa loader 58.95 kB / 20.09 kB (gzip) 58.95 kB / 20.09 kB (gzip) 0% / 0% (gzip)
spa async-chunk 110.68 kB / 33.28 kB (gzip) 113.01 kB / 34 kB (gzip) 2.11% / 2.18% (gzip)

Copy link

codecov bot commented Sep 18, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 88.43%. Comparing base (a21b939) to head (d4b396c).
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1193      +/-   ##
==========================================
+ Coverage   88.38%   88.43%   +0.05%     
==========================================
  Files         164      164              
  Lines        7229     7229              
  Branches     1478     1478              
==========================================
+ Hits         6389     6393       +4     
+ Misses        722      717       -5     
- Partials      118      119       +1     
Flag Coverage Δ
integration-tests 91.92% <100.00%> (+0.15%) ⬆️
unit-tests 78.66% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@ptang-nr ptang-nr changed the title feat: Upgrade to web-vitals v4 chore: Upgrade to web-vitals v4 Sep 18, 2024
@ptang-nr ptang-nr changed the title chore: Upgrade to web-vitals v4 feat: Upgrade to web-vitals v4 Sep 19, 2024
Copy link

github-actions bot commented Sep 19, 2024

Static Badge

Last ran on September 23, 2024 09:32:07 CDT
Checking merge of (d869491) into main (fd033a7)

cwli24
cwli24 previously approved these changes Sep 19, 2024
Copy link
Contributor

@cwli24 cwli24 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work

Copy link
Member

@metal-messiah metal-messiah left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

all tests passing 👍 nicely done

@ptang-nr ptang-nr merged commit 81349b8 into main Sep 23, 2024
18 checks passed
@ptang-nr ptang-nr deleted the upgrade-to-web-vitals-v4 branch September 23, 2024 19:26
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.

3 participants