feat(core): Capture # of dropped spans through beforeSendTransaction#13022
Merged
feat(core): Capture # of dropped spans through beforeSendTransaction#13022
beforeSendTransaction#13022Conversation
mydea
commented
Jul 23, 2024
| const spans = event.spans || []; | ||
| // the transaction itself counts as one span, plus all the child spans that are added | ||
| const spanCount = 1 + spans.length; | ||
| this._outcomes['span'] = (this._outcomes['span'] || 0) + spanCount; |
Member
Author
There was a problem hiding this comment.
Noticed that this was actually buggy, because the key is built from reason + category 😬 now this is unified and should work consistently.
Contributor
size-limit report 📦
|
Lms24
approved these changes
Jul 23, 2024
Member
Lms24
left a comment
There was a problem hiding this comment.
l: no particular strong feelings given these are client reports but should we add a test for them?
Member
Author
Yeah I thought about this too, I'll add some I think! |
c67e225 to
aeefa66
Compare
15d9059 to
f6ddc1c
Compare
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.
Fixes #12849.
This is a bit tricky because
beforeSendTransactioncan return a promise, so in order to avoid dealing with this I put the # of spans on the sdk metadata, and then compare that afterwards.