Uh oh!
There was an error while loading. Please reload this page.
feat(core)!: Pass root spans to beforeSendSpan and disallow returning null - #14831
Merged
Conversation
Contributor
size-limit report 📦
|
chargome
marked this pull request as ready for review
December 31, 2024 11:55
Lms24
reviewed
Jan 2, 2025
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Lms24
approved these changes
Jan 7, 2025
| }; | ||
| } | ||
| return beforeSendTransaction(event, hint); | ||
| return beforeSendTransaction(processedEvent as TransactionEvent, hint); |
Member
There was a problem hiding this comment.
l (not blocking): Is there a way we can get rid of this type cast? No worries if not, just curious since there's the isTransactionEvent check above 🤔
MemberAuthor
There was a problem hiding this comment.
yeah somehow no matter what I do, after the merge call ts thinks it's an event again, even if I do
processedEvent=merge<TransactionEvent>(processedEvent,convertSpanJsonToTransactionEvent(processedRootSpanJson),);
This was referenced Apr 24, 2025
s1gr1d added a commit
that referenced
this pull request
Apr 25, 2025
Docs follow-up for this PR: #14831 --------- Co-authored-by: Francesco Gringl-Novy <francesco.novy@sentry.io>
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 freeto 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.
beforeSendSpanbeforeSendSpanLooked at two options for passing the root span:
SentrySpanclass, before converting the root span into a transaction.SpanJSONout of an event and then writing back the updated values into the event.Went with (2), passing the root span within
processBeforeSendto have all processing hooks centrally in one place and because the other approach would have been too messy.closes#14336