Merged
Conversation
Contributor
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.
🦋 Changeset detectedLatest commit: 140f3c3 The changes in this PR will be included in the next version bump. This PR includes changesets to release 3 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Collaborator
Size Report 1Affected Products
Test Logs |
Collaborator
Size Analysis Report 1Affected Products
Test Logs |
raymondlam
approved these changes
Nov 21, 2024
fe72ce1 to
4b4d9ad
Compare
raymondlam
approved these changes
Nov 27, 2024
| void | ||
| >; | ||
| let createOobTraceStub: SinonStub< | ||
| let createOobTraceStub: SinonSpy< |
Member
There was a problem hiding this comment.
nit: createOobTraceStub -> createOobTraceSpy
| method: 'POST', | ||
| body: JSON.stringify(data) | ||
| }); | ||
| return navigator.sendBeacon(flTransportFullUrl, JSON.stringify(data)); |
Member
There was a problem hiding this comment.
We should have a fall back to fetch if sendBeacon fails (eg. payload is > then the ~64KB limit)
(navigator.sendBeacon && navigator.sendBeacon(flTransportFullUrl, JSON.stringify(data))) ||
fetch(flTransportFullUrl, {
method: 'POST',
body: JSON.stringify(data),
keepalive: true
}
);
8ca7c35 to
721fcbf
Compare
Contributor
Changeset File Check ✅
|
jposuna
approved these changes
Jan 17, 2025
Contributor
jposuna
left a comment
There was a problem hiding this comment.
Looks great, thanks for making the changes Bryan!
…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.
…load now, so no need to add additional timeouts.
… often updates the values at unload time, and os queuing this until the end means those latest values get captured.
22a8ae5 to
140f3c3
Compare
hsubox76
approved these changes
Jan 21, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.