-
Notifications
You must be signed in to change notification settings - Fork 44
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: Centralize web vitals timings #635
Conversation
Asset Size Report
Merging this pull request will result in the following asset size changes:
|
Codecov Report
@@ Coverage Diff @@
## main #635 +/- ##
=======================================
Coverage ? 86.76%
=======================================
Files ? 137
Lines ? 5245
Branches ? 808
=======================================
Hits ? 4551
Misses ? 634
Partials ? 60
Flags with carried forward coverage won't be shown. Click here to find out more.
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is a lot cleaner and better structured from having an object that gets imported, wrote to, and read from willy nilly in the code base. I do wonder if we should not go ahead and move the other timings that are just in the page view timing aggregator: endCurrentSession
and recordPageUnload
.
Looks good. Need jest tests for the new |
Centralize web vitals timings to be accessible from any part of the agent.
Overview
This PR utilizes a singleton export of the vitals timings with a pub/sub methodology to share identical data across the agent. This will create better consistency and replace areas of the agent leaning on differing methodologies.
Related Issue(s)
NR-101330
Testing
Existing timing tests should continue to pass.
New jest tests have been added for each vital file
New jest test has been made to
replace
some of the web-vitalsbrowser
tests that became broken by changing this behavior