Skip to content

feat(attachments): Add rate limited crash reports to an attachments context - #6724

Open
elramen wants to merge 9 commits into
masterfrom
elramen-ratelimitctx
Open

elramen wants to merge 9 commits into
masterfrom
elramen-ratelimitctx

Conversation

@elramen

@elramen elramen commented Nov 19, 2026 •

Copy link
Copy Markdown
Member

Add an attachments context to events. It contains reason codes for attachments that were rate limited.

Fixes https://linear.app/getsentry/issue/INGEST-1326

…ontext

When a crash report is rate limited, the processing Relay adds it to a
new attachments context on the event, together with the reason code of
the rate limit. This lets Sentry tell users that a crash report was not
stored because of their quota.

Refs INGEST-1326

@elramen elramen left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

same here

records: &mut RecordKeeper<'_>,
) -> Result<()> {
if !self.0.data().rate_limited() {
let reason_code = limits.longest().and_then(|limit| limit.reason_code.clone());

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

longest() aligns with how outcomes work

data.into_payload().append_to_store(&mut attachments);
attachments.extend(flamegraph);

add_rate_limited_attachments_context(&mut event, &attachments);

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Put this here for simplicity, would require a lot more changes to call this earlier in the pipeline.

@elramen
elramen marked this pull request as ready for review November 20, 2026 15:44
@elramen
elramen requested a review from a team as a code owner November 20, 2026 15:44
@elramen
elramen requested a review from ericapisani November 20, 2026 15:47
@linear-code

linear-code Bot commented Nov 20, 2026

Copy link
Copy Markdown

INGEST-1326

This branch has not been deployed

No deployments
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.

1 participant