-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(core)!: Pass root spans to beforeSendSpan
and disallow returning null
#14831
base: develop
Are you sure you want to change the base?
Conversation
size-limit report 📦
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This generally looks good to me and I think the conversion is correct. Before we merge this, let's please add a sentence to the PR description why we went with this approach instead of calling beforeSendSpan
earlier for posterity.
...event.sdkProcessingMetadata, | ||
spanCountBeforeProcessing: spanCountBefore, | ||
}; | ||
} | ||
return beforeSendTransaction(event, hint); | ||
return beforeSendTransaction(processedEvent as TransactionEvent, hint); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 🤔
beforeSendSpan
beforeSendSpan
Looked at two options for passing the root span:
SentrySpan
class, before converting the root span into a transaction.SpanJSON
out of an event and then writing back the updated values into the event.Went with (2), passing the root span within
processBeforeSend
to have all processing hooks centrally in one place and because the other approach would have been too messy.closes #14336