fix: transaction processors no longer discard each other's results - #5621
Merged
Merged
Conversation
Each iteration passed the original transaction instead of the running result, so with more than one processor every intermediate result was discarded and only the last processor's output survived. Event processors already chain correctly. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #5621 +/- ##
=======================================
Coverage 74.85% 74.85%
=======================================
Files 515 515
Lines 18962 18962
Branches 3694 3694
=======================================
Hits 14194 14194
Misses 3891 3891
Partials 877 877 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
ric-oliv
approved these changes
Sep 24, 2026
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.
SentryClient.CaptureTransactionpassed the original transaction to every processor in the chain instead of the running result:ISentryTransactionProcessorexplicitly allows returning a new instance — "The transaction returned can be the same instance received or a new one." With more than one processor, every intermediate result was therefore discarded and only the last processor's output survived, while each processor saw the unprocessed original. The result is a partially processed transaction, silently.Anyone whose processors mutate and return the same instance — the common case — is unaffected, which is why this went unnoticed.
SentryEventHelper.ProcessEventalready chains correctly, so the two loops had simply diverged.Spotted by @ric-oliv while reviewing #5607; pulled out into its own PR so it isn't blocked behind that stack and gets its own changelog entry.
The regression test fails without the one-line fix (the second processor receives the original rather than the first's replacement) and passes with it.
🤖 Generated with Claude Code