ref(browser): Ensure idle span ending is consistent#12310
Merged
Conversation
Contributor
size-limit report 📦
|
lforst
reviewed
May 31, 2024
| // If we have no spans, we just end, nothing else to do here | ||
| if (!spans.length) { | ||
| onIdleSpanEnded(spanEndTimestamp); | ||
| return Reflect.apply(target, thisArg, args); |
Contributor
There was a problem hiding this comment.
Is this change intended? Me idiot.
a bit scary though this change 🤔 Can we make sure with a type that we forward all the args in case the api is ever expanded.
Member
Author
There was a problem hiding this comment.
Hard to do with a type as stuff would always have to be optional, so this would always match - but I added code to ensure we also pass rest arguments, so that is forwards-compatible!
lforst
approved these changes
May 31, 2024
Lms24
approved these changes
May 31, 2024
15add0e to
4fea67e
Compare
c298lee
pushed a commit
that referenced
this pull request
Jun 4, 2024
This was referenced Jul 3, 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.
Saw this flake here: https://github.com/getsentry/sentry-javascript/actions/runs/9316244122/job/25644256391
It seems this was sometimes minimally flakey because we used a slightly different end time in the two places - no, we ensure to use the same, which should make this more consistent.