Your sampleRate won't save you from an error flood. Here’s what does
Description and use
Sentry’s sampleRate randomly drops errors, causing rare bugs to be missed during error floods. The fix is to send all events and apply server‑side rate limiting per fingerprint, keeping the first 100 stack traces per minute.
Problem
SampleRate in Sentry SDK drops errors randomly, causing rare bugs to be missed during error floods.
Outcome
Server-side per-fingerprint rate limiting captures rare bugs while reducing noisy flood loops, unlike client-side sampleRate which randomly drops all events.
Workflow
- 1. Run flood test with @sentry/node SDK and sampleRate 0.1. 2. Observe 90% of loop errors and 90% of rare errors are dropped. 3. Create ingest.js to accept Sentry envelopes and count errors per fingerprint. 4. Implement token bucket per fingerprint (100 tokens, refilled 100/min). 5. Send all events to ingest.js. 6. Ingest.js stores first 100 stack traces per fingerprint per minute. 7. Verify rare bugs are retained while flood loop is throttled.
Evidence
sampleRate drops errors at random. It cuts the noisy loop by 90% and your one-off bugs by the same 90%
What worked: send everything, then rate limit stored bodies per fingerprint on the server.
The SDK drops events before sampling even runs: Dedupe eats exact repeats, and a tight burst overflows the 64-slot transport buffer.
- Record date: 2026-10-07T21:55:47.928Z