Repository navigation
fix(cli): Keep one copy of a resent event in sentry local - #2480
Conversation
An SDK with both Spotlight and a DSN on the same Local receiver sends every error and transaction twice with the same event_id, and the tail and `local event list` showed both. Receivers and sessions now keep the first copy of an event, transaction, or feedback envelope per event ID while it is retained. Replay segments, check-ins, and envelopes without an event ID are kept as before. Co-Authored-By: Aditya Mathur <57684218+MathurAditya724@users.noreply.github.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
The dedupe key read only the envelope header's event_id, while event list falls back to the event or transaction item's. An envelope with its ID only in the item still showed twice under that ID. Both now use one lookup. The receiver computes the key from the header it already parsed and the item header lines, and reads an item payload only when the header has no event ID, so retention no longer decodes the envelope to check it. Co-Authored-By: Aditya Mathur <57684218+MathurAditya724@users.noreply.github.com>
MathurAditya724
left a comment
There was a problem hiding this comment.
Reviewed exact head 664b672 against current main. No actionable findings. Typecheck and lint passed; the full workspace test suite passed on rerun. One viewer history-navigation test failed on the initial run and passed both in isolation and on the full rerun. Reviewed dedup identity/eviction/clear behavior and exclusions for replay segments, check-in updates, logs and spans. Independent verify-toolkit CLI QA used a real Node SDK with both DSN and Spotlight pointing at the isolated receiver: the same captured error was retained exactly once. Session retention, summary and capability-redaction checks passed (sentry-local#session-retained, sentry-local#event-list-summary, sentry-local#capability-redacted).
When a JS SDK has both Spotlight and a DSN pointing at the same Local receiver, it sends every error and transaction twice with the same
event_id. The tail andlocal event listshowed both copies. Posting the same envelope twice did the same.Now a receiver or session keeps the first copy of an
event,transactionorfeedbackenvelope per event ID, as long as that copy is still retained. The resend still gets a 200. The event ID is the same onelocal event listshows: the headerevent_id, or the event or transaction item's when the header has none. The receiver works it out from the item headers while it accepts the envelope, so the plain receiver, sessions andlocal runall get it.Some things share an ID on purpose, so they're left alone:
via @MathurAditya724.
--
View Session [Sentry]