feat(envelopes): Observe filtered envelope items#1182
Open
szokeasaurusrex wants to merge 3 commits into
Open
Conversation
|
szokeasaurusrex
commented
Jun 19, 2026
408f667 to
a3bcb31
Compare
ea171be to
0bbc410
Compare
Add an `EnvelopeFilter` trait and callback container so callers can observe items removed by `Envelope::filter`. This includes items rejected directly by the filter and attachments removed later when their event or transaction is no longer present. Keep existing closure-based callers source-compatible through a blanket `FnMut(&EnvelopeItem) -> bool` implementation. Some closure sites may need an explicit item type annotation after this generalization. Closes [#1181](#1181) Closes [RUST-245](https://linear.app/getsentry/issue/RUST-245) # Conflicts: # CHANGELOG.md
0bbc410 to
d8b9ef9
Compare
a3bcb31 to
a504ed6
Compare
This comment has been minimized.
This comment has been minimized.
lcian
reviewed
Jun 23, 2026
Member
Author
Co-authored-by: Lorenzo Cian <17258265+lcian@users.noreply.github.com>
lcian
reviewed
Jun 23, 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.
Add an
EnvelopeFiltertrait and callback container so callers can observeitems removed by
Envelope::filter. This includes items rejected directly bythe filter and attachments removed later when their event or transaction is no
longer present.
Keep existing closure-based callers source-compatible through a blanket
FnMut(&EnvelopeItem) -> boolimplementation. Some closure sites may need anexplicit item type annotation after this generalization.
Closes #1181
Closes RUST-245