Conversation
Record callback_error/profile when beforeSendTransaction or a customer transaction processor throws and an attached profile is dropped. Notify OnDiscardCallback through the same client-report accounting path. Cover scope and options processors, absent profiles, and SDK processor failures that retain profiles. Leave catch types, intentional drops, and profile-file cleanup unchanged. Refs #6081 Co-Authored-By: Claude <noreply@anthropic.com>
This was referenced Sep 25, 2026
📲 Install BuildsAndroid
|
9 tasks
This branch has not been deployed
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.
PR Stack (Callback Errors)
📜 Description
Record one
callback_error/profileloss when an attached transaction profile is dropped becausebeforeSendTransactionor a customer event processor throws. The same accounting path notifiesOnDiscardCallback.Pass profile presence into the private transaction-processing helpers so scope and options processors both account for the loss. Transactions without profiles do not report profile losses. SDK processor failures continue sending the transaction and attached profile without reporting a loss.
Existing transaction/span accounting, intentional-drop behavior, and catch types are unchanged. This does not change profile-file cleanup or continuous profile chunks.
💡 Motivation and Context
Transaction callback failures already record the lost transaction and spans, but omit an attached profile that is dropped with them. Include that profile so client reports and discard observers reflect the full loss.
💚 How did you test it?
./gradlew spotlessApply apiDump./gradlew :sentry:apiCheck :sentry:spotlessCheck :sentry:test --tests='*SentryClientTest*' --tests='*SentryClientTransactionProfileTest*' --tests='*SentryClientInternalEventProcessorTest*' --tests='*ClientReportTest*' --info— 295 tests passedbeforeSendTransaction, each with and without an attached profile. Assert exact client-report counts and discard notifications.📝 Checklist
sendDefaultPIIis enabled.🔮 Next steps
Profile/replay artifact cleanup remains a separate follow-up. Callback-boundary catch-type changes remain deferred to the next major.