Skip to content

fix(cli): Answer accepted envelopes with 200 and the event ID - #2432

Merged
MathurAditya724 merged 3 commits into
mainfrom
fix/local-ingest-200-id
Nov 19, 2026
Merged

MathurAditya724 merged 3 commits into
mainfrom
fix/local-ingest-200-id

Conversation

@sentry-junior

@sentry-junior sentry-junior Bot commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

sentry-elixir only counts an envelope as sent when it gets a 200 with a JSON id. Local answered 204 with no body, so Elixir retried each envelope at 1, 2, 4 and 8 seconds and blocked its queue: one event showed up five times and the rest never arrived.

Local now answers with a 200 and the event id, like Relay, on every ingest path, plain and session:

Before:

POST /stream  ->  204 (no body)

After:

POST /stream  ->  200 {"id":"9ec79c33ec9942ab8353589fcb2e04dc"}

The id comes from the envelope header's event_id, without hyphens, as Relay prints it. Envelopes without one, such as logs or sessions, get 200 {}. The error responses (400, 410, 413, 415, 503) don't change.

As far as I can tell from their transport code, the browser, Go, PHP, Ruby and Rust SDKs treat any 2xx as success, so they shouldn't notice the change.

via @MathurAditya724.

--

View Session [Sentry]

sentry-elixir only treats a delivery as sent when it gets HTTP 200 with a
JSON body that has an id. It retries anything else at 1, 2, 4 and 8 seconds,
which blocks its queue, so one event arrived five times and the rest were
lost. Answer the way Relay does: 200 with {"id":"<event_id>"} from the
envelope header, or {} when there is none, on every plain and session
ingest path. Other status codes are unchanged.

Co-Authored-By: Aditya Mathur <57684218+MathurAditya724@users.noreply.github.com>
@vercel

vercel Bot commented Nov 19, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
cli Ready Ready Preview Nov 19, 2026 7:04pm UTC
1 Skipped Deployment
Project Deployment Actions Updated
sentry-local Skipped Skipped Nov 19, 2026 7:04pm UTC

Request Review

@github-actions github-actions Bot added the risk: medium PR risk score: medium label Nov 19, 2026
The viewer integration tests post to a real receiver, which now answers
accepted envelopes with 200 and the event ID.

Co-Authored-By: Aditya Mathur <57684218+MathurAditya724@users.noreply.github.com>
Co-Authored-By: Aditya Mathur <57684218+MathurAditya724@users.noreply.github.com>

@MathurAditya724 MathurAditya724 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.

Reviewed and retested with current main. Typecheck, lint and the full workspace test suite pass. An independent real-HTTP probe passed 64 deliveries across plain and session ingest routes, identity/gzip/deflate/br compression, and lowercase/uppercase/hyphenated/missing event IDs. Acknowledgements are HTTP 200 with JSON; error paths and retention behavior remain covered by the suite. Checked the official sentry-elixir transport implementation's 200/JSON success contract. No actionable findings.

@MathurAditya724
MathurAditya724 merged commit 3be6619 into main Nov 19, 2026
32 checks passed
@MathurAditya724
MathurAditya724 deleted the fix/local-ingest-200-id branch November 19, 2026 19:42
sentry-junior Bot added a commit that referenced this pull request Nov 19, 2026
Keep #2432's 200 JSON acknowledgement for session ingest, recording
activity only for accepted envelopes, on the session ID resolved once
at the top of the handler.

Co-Authored-By: Aditya Mathur <57684218+MathurAditya724@users.noreply.github.com>
sentry-junior Bot added a commit that referenced this pull request Nov 19, 2026
Keep #2432's 200 acknowledgement next to the 400 rejection: ingest now
returns a tagged result, reads the envelope header once, and both
receivers answer through the shared ingestResponse.

Co-Authored-By: Aditya Mathur <57684218+MathurAditya724@users.noreply.github.com>

This branch was successfully deployed

1 active and 1 inactive deployments
Preview – cli — 5dccba82 Deployed Nov 19, 2026 by vercel[bot]
Preview – sentry-local — 5dccba82 Deployed Nov 19, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

risk: medium PR risk score: medium

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant