-
Notifications
You must be signed in to change notification settings - Fork 892
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
Fireperf web vitals #8644
base: main
Are you sure you want to change the base?
Fireperf web vitals #8644
Conversation
bryanatkinson
commented
Nov 18, 2024
- Add support for capturing web vitals metrics in Firebase performance for Web (Largest Contentful Paint, Interaction to Next Paint, Cumulative Layout Shift)
- Modifies export to use sendBeacon instead of fetch API, and shifts the upload time to the first time the page is hidden or unloaded.
…for Web. Modifies export to use sendBeacon instead of fetch API, and shifts the upload time to the first time the page is hidden or unloaded.
|
Size Report 1Affected Products
Test Logs |
Size Analysis Report 1Affected Products
Test Logs |
metric?: CoreVitalMetric | ||
): void { | ||
if (metric) { | ||
trace.putMetric(metricKey, Math.floor(metric.value * 1000)); |
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.
Did we document that cls score is multiplied by 1000 in our BE?
setTimeout(() => { | ||
Trace.createOobTrace( | ||
performanceController, | ||
navigationTimings, | ||
paintTimings, | ||
webVitalMetrics, | ||
firstInputDelay | ||
); | ||
}, FID_WAIT_TIME_MS); |
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.
Is this needed anymore since we are always sending at the end of the page session. Since we call this on page unload, we don't need an extra timeout here.
* Force flush the queued events. Useful at page unload time to ensure all | ||
* events are uploaded. | ||
*/ | ||
export function flushQueuedEvents(): void { |
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.
Just to double check, regular traces/network requests should still be dispatched periodically before this flush is called right?