You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Replace CWV metrics with GoogleChrome/web-vitals library NEWRELIC-6214 (#435)
* Swap LCP NEWRELIC-7102
* Remove nav-cookie NR-57391 & update agent start times and offset
* Swap FID NEWRELIC-7103
* Swap FP & FCP NEWRELIC-7105
* Cap LCP, FCP, and FID to once after swap
* Swap TTFB and PVE instrument timings NEWRELIC-7106
* Change fe & dc to event end instead of event start
* Exclude onTTFB from non-main ctx agents & remove old test
* Update failing addeventlistener test
* Recalibrate vitals matchers and fix PVE tests
* Swap CLS NEWRELIC-7104
* Fix a cls browser test
* Undo onCLS callback capping
* Defer PVE & PVT loader code to post-load time
* Exclude current ios from FCP test
* Update LCP browser tests after pvt agg change
* Revert ios FCP test exclusion & introduce fallback
* Combine if-cases in PVE
Copy file name to clipboardExpand all lines: src/common/timing/now.js
+1-6Lines changed: 1 addition & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -3,12 +3,7 @@
3
3
* SPDX-License-Identifier: Apache-2.0
4
4
*/
5
5
6
-
/**
7
-
* This is TO BE REMOVED AND REPLACED by web-vitals TTFB
8
-
* @type {number} - An integer time-stamp representing the time the agent side-effects first ran
9
-
*/
10
-
exportconstimportTimestamp=newDate().getTime()
11
-
6
+
// This is our own layer around performance.now. It's not strictly necessary, but we keep it in case of future mod-ing of the value for refactor purpose.
// These 3 values should've been recorded after load and before this func runs. They are part of the minimum required for PageView events to be created.
64
+
// Following PR #428, which demands that all agents send RUM call, these need to be sent even outside of the main window context where PerformanceTiming
65
+
// or PerformanceNavigationTiming do not exists. Hence, they'll be filled in by 0s instead in, for example, worker threads that still init the PVE module.
// For majority browser versions in which PNT exists, we can get load timings later from the nav entry (in the aggregate portion). At minimum, PT should exist for main window.
18
+
// *cli Mar'23 - iOS 15.2 & 15.4 testing in Sauce still fails with onTTFB. Hence, all iOS will fallback to this for now. Unknown if this is similar in nature to iOS_below16 bug.
onWindowLoad(()=>this.measureWindowLoaded(),true)// we put this in the front of load listeners (useCapture=true) for better precision on measuring when it fires!
21
-
this.importAggregator()// the measureWindowLoaded cb should run *before* the page_view_event agg runs
22
-
}
23
-
24
-
// should be called on window.load or window.onload, will not be called if agent is loaded after window load
0 commit comments