feat(tracing): make long animation frames opt-out#13255
Merged
Conversation
Contributor
Author
|
a lot of failing tests due to an undefined PerformanceObserver? Wonder if we need to add a mockPerformanceObserver to all the tests or if there's a better solution |
Lms24
reviewed
Aug 7, 2024
Member
There was a problem hiding this comment.
I took a look at the failing tests and looks like there are two classes of test fails:
- fails because
PerformanceObserveris undefined in unit tests. I think you're right, this is likely because certain global APIs likePerformanceObserverare missing in the test environment. But it surfaces a good point: We should guard referencingPerformanceObserverbecause we should be defensive about it not being present (for example if people use the SDK in web workers). - fails in integration tests because long animation frame spans are added to transaction events where we don't expect them. I think here we should just check that what we receive is correct and adjust the tests as necessary.
Contributor
size-limit report 📦
|
Lms24
approved these changes
Aug 9, 2024
Member
Lms24
left a comment
There was a problem hiding this comment.
Looks good to me! Thanks for adjusting the tests!
This was referenced Sep 4, 2024
This was referenced Sep 24, 2024
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Enable long animation frames by default. If long animation frames are not supported by the browser, Sentry will fallback to using long tasks where enabled.