Skip to content

feat: Remove FID #1319

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

Merged
merged 9 commits into from
Jan 24, 2025
Merged

feat: Remove FID #1319

merged 9 commits into from
Jan 24, 2025

Conversation

ptang-nr
Copy link
Contributor

@ptang-nr ptang-nr commented Jan 11, 2025

First Input Delay (FID) has been deprecated and replaced by Interaction To Next Paint (INP). PageViewTiming events for first interactions are preserved by detecting the first first-input event and will no longer output value for the firstInputDelay and loadState attributes. For more info on PageViewTiming, see https://docs.newrelic.com/docs/browser/new-relic-browser/page-load-timing-resources/pageviewtiming-async-or-dynamic-page-details/. For more info on INP and the FID deprecation, see https://web.dev/articles/inp.

Overview

In this PR, we are proceeding with the removal of FID related logic from the browser agent.

Notes:

  • The firstInteraction timing event should continue to be detected as-is, with the exception of no longer collecting or generating values for firstInputDelay and loadState attributes. Supported in Chrome, Edge, Firefox and Android. Not supported on Safari and iOS (see PerformanceEventTming browser compatibility)

Related Issue(s)

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

Testing

Updated existing tests that dealt with FID.
Added unit tests for first interaction.
Manually tested

  • Detection of first input on Chrome
  • No first input detected when page is opened in background on Chrome

Preserve `firstInteraction` by detecting the first INP instead of FID event.
Copy link

github-actions bot commented Jan 11, 2025

Asset Size Report

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

Agent Asset Previous Size New Size Diff
lite loader 29.77 kB / 10.79 kB (gzip) 29.77 kB / 10.79 kB (gzip) 0% / -0.04% (gzip)
lite async-chunk 52.59 kB / 17.08 kB (gzip) 51.25 kB / 16.71 kB (gzip) -2.56% / -2.15% (gzip)
pro loader 51.46 kB / 17.77 kB (gzip) 51.46 kB / 17.77 kB (gzip) 0% / 0.01% (gzip)
pro async-chunk 99.77 kB / 30.52 kB (gzip) 98.29 kB / 30.11 kB (gzip) -1.49% / -1.33% (gzip)
spa loader 59.08 kB / 20.09 kB (gzip) 59.08 kB / 20.09 kB (gzip) 0% / 0% (gzip)
spa async-chunk 114.49 kB / 34.85 kB (gzip) 113 kB / 34.45 kB (gzip) -1.29% / -1.15% (gzip)

Copy link

codecov bot commented Jan 11, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 88.66%. Comparing base (45cb413) to head (ca6926d).
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1319      +/-   ##
==========================================
- Coverage   88.70%   88.66%   -0.05%     
==========================================
  Files         170      171       +1     
  Lines        7331     7340       +9     
  Branches     1488     1487       -1     
==========================================
+ Hits         6503     6508       +5     
  Misses        716      716              
- Partials      112      116       +4     
Flag Coverage Δ
unit-tests 79.95% <100.00%> (+0.01%) ⬆️

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.

Copy link

github-actions bot commented Jan 11, 2025

Static Badge

Last ran on January 17, 2025 14:09:13 CST
Checking merge of (0e8aac2) into main (e7e0114)

@ptang-nr ptang-nr merged commit 0f32b99 into main Jan 24, 2025
15 of 16 checks passed
@ptang-nr ptang-nr deleted the NR-355558-update-first-interaction branch January 24, 2025 20:37
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