Repository navigation
feat(types): Add client report loss source API - #1170
Merged
szokeasaurusrex merged 7 commits intoJun 24, 2026
Merged
szokeasaurusrex merged 7 commits into
szokeasaurusrex merged 7 commits into
Conversation
|
szokeasaurusrex
force-pushed
the
szokeasaurusrex/envelope-loss-item
branch
6 times, most recently
from
June 17, 2026 15:52
f10c34a to
ea819f9
Compare
szokeasaurusrex
marked this pull request as ready for review
June 17, 2026 15:54
szokeasaurusrex
force-pushed
the
szokeasaurusrex/envelope-loss-item
branch
from
June 17, 2026 16:03
ea819f9 to
d3dd20b
Compare
szokeasaurusrex
changed the base branch from
szokeasaurusrex/transport-report-recorder
to
szokeasaurusrex/client-report-protocol
June 17, 2026 16:03
lcian
reviewed
Jun 17, 2026
szokeasaurusrex
force-pushed
the
szokeasaurusrex/envelope-loss-item
branch
from
June 18, 2026 10:01
7034485 to
64f6173
Compare
szokeasaurusrex
force-pushed
the
szokeasaurusrex/envelope-loss-item
branch
from
June 18, 2026 15:05
67684a5 to
346c3f6
Compare
szokeasaurusrex
force-pushed
the
szokeasaurusrex/envelope-loss-item
branch
from
June 19, 2026 08:46
346c3f6 to
978829b
Compare
szokeasaurusrex
force-pushed
the
szokeasaurusrex/envelope-loss-item
branch
from
June 19, 2026 12:08
978829b to
9b9ac77
Compare
szokeasaurusrex
force-pushed
the
szokeasaurusrex/envelope-loss-item
branch
from
June 19, 2026 16:05
9b9ac77 to
b07e9bd
Compare
szokeasaurusrex
force-pushed
the
szokeasaurusrex/envelope-loss-item
branch
from
June 19, 2026 16:33
b07e9bd to
fc43fb1
Compare
Member
Author
szokeasaurusrex
force-pushed
the
szokeasaurusrex/envelope-loss-item
branch
from
June 22, 2026 08:12
581d5d4 to
52c53d1
Compare
szokeasaurusrex
force-pushed
the
szokeasaurusrex/envelope-loss-item
branch
from
June 22, 2026 11:20
52c53d1 to
d187485
Compare
szokeasaurusrex
marked this pull request as draft
June 22, 2026 15:07
Add `Envelope::losses_on_drop` so transports can inspect an envelope before dropping it and report the data categories and quantities that were lost through client reports. The new mapping covers all parsed envelope item types that contribute reportable losses: - events, sessions, transactions, spans, attachments, and monitor check-ins - log item counts and serialized log bytes - trace metric counts Expose `EnvelopeLossIter` from `sentry-types` and add the client report `Category` variants needed to represent the resulting losses. Client report items and raw envelope items intentionally do not produce additional losses. Add a changelog entry for the new dropped-envelope loss APIs. Resolves [#1171](#1171) Resolves [RUST-242](https://linear.app/getsentry/issue/RUST-242)
Expose a sealed trait for protocol values that can describe their client report losses. Keep the concrete loss iterators private so the public API does not commit to the internal representation.
szokeasaurusrex
force-pushed
the
szokeasaurusrex/envelope-loss-item
branch
from
June 23, 2026 09:37
e0f982a to
cb9d481
Compare
Member
Author
szokeasaurusrex
marked this pull request as ready for review
June 23, 2026 11:00
lcian
approved these changes
Jun 23, 2026
This was referenced Jun 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.
Add a sealed
LossSourcetrait so supported protocol values can describe the client report data categories and quantities lost when they are discarded.This standardizes how different telemetry items are counted as client report losses.
EnvelopeandEnvelopeItemboth implementLossSource, along with the supported envelope item payload types.The loss mapping covers:
Client report items and raw envelope items intentionally do not produce additional losses.
Resolves #1171
Resolves RUST-242