Skip to content

feat(envelopes): Observe filtered envelope items - #1182

Merged
szokeasaurusrex merged 3 commits into
szokeasaurusrex/envelope-type-improvementfrom
szokeasaurusrex/envelope-filter
Jun 24, 2026
Merged

szokeasaurusrex merged 3 commits into
szokeasaurusrex/envelope-type-improvementfrom
szokeasaurusrex/envelope-filter

Conversation

@szokeasaurusrex

@szokeasaurusrex szokeasaurusrex commented Jun 19, 2026 •

Copy link
Copy Markdown
Member

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
Closes RUST-245

@github-actions

github-actions Bot commented Jun 19, 2026 •

Copy link
Copy Markdown
Messages
📖 Do not forget to update Sentry-docs with your feature once the pull request gets approved.

Generated by 🚫 dangerJS against e81af4d

@szokeasaurusrex
szokeasaurusrex marked this pull request as ready for review June 19, 2026 16:23
@szokeasaurusrex
szokeasaurusrex requested a review from lcian as a code owner June 19, 2026 16:23
@linear-code

linear-code Bot commented Jun 19, 2026

Copy link
Copy Markdown

RUST-245

Comment thread sentry-types/src/protocol/envelope.rs Resolved
@szokeasaurusrex
szokeasaurusrex force-pushed the szokeasaurusrex/envelope-filter branch from 408f667 to a3bcb31 Compare June 22, 2026 08:12
szokeasaurusrex and others added 2 commits June 22, 2026 13:20
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
@szokeasaurusrex
szokeasaurusrex force-pushed the szokeasaurusrex/envelope-filter branch from a3bcb31 to a504ed6 Compare June 22, 2026 11:20
@lcian

This comment has been minimized.

Comment thread sentry-types/src/protocol/envelope.rs Resolved
@szokeasaurusrex

Copy link
Copy Markdown
Member Author

@lcian regarding the CI failure, I have also noticed this flakiness, and have already opened an issue to investigate: #1112.

Co-authored-by: Lorenzo Cian <[email protected]>
@szokeasaurusrex
szokeasaurusrex requested a review from lcian June 23, 2026 09:38
Comment thread sentry-types/src/protocol/envelope.rs Resolved

@lcian lcian left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@szokeasaurusrex
szokeasaurusrex merged commit 5695bdd into master Jun 24, 2026
27 checks passed
@szokeasaurusrex
szokeasaurusrex deleted the szokeasaurusrex/envelope-filter branch June 24, 2026 12:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants