Installation
This integration is enabled by default in all Sentry SDKs.How It Works
The integration compares consecutive error events and drops duplicates based on:- Message events: Same error message, stacktrace, and fingerprint
- Exception events: Same exception type, value, stacktrace, and fingerprint
1
Event Captured
A new error event is captured
2
Compare with Previous
The integration compares it with the last captured event
3
Check Duplicates
Matches are checked for:
- Exception type and value
- Error message
- Stacktrace (filename, line, column, function)
- Fingerprint
4
Drop or Send
If it’s a duplicate, the event is dropped. Otherwise, it’s sent to Sentry.
What Gets Deduped
Duplicate Exception Events
The same error thrown multiple times in quick succession:Duplicate Message Events
The same error message captured repeatedly:What Doesn’t Get Deduped
Different Error Types
Different Stacktraces
Non-Error Events
Transactions, replays, and other event types are never deduped:Comparison Logic
The integration performs detailed comparison:Message Comparison
Exception Comparison
Stacktrace Comparison
All stack frames must match exactly:Disabling Dedupe
If you want to disable deduplication:Deduplication Scope
The integration only compares with the immediately previous event:Custom Fingerprinting
Use custom fingerprints to control deduplication:Source Code
The Dedupe integration is implemented in:packages/core/src/integrations/dedupe.ts:12
Practical Examples
Event Loop Errors
Prevents flooding from errors in event handlers:Retry Logic
Avoids duplicate reports during retries:Polling Operations
Prevents duplicate errors from periodic operations:Limitations
- Only compares with previous event: Not a global deduplication across all events
- Requires exact match: Small differences in stacktrace will bypass dedupe
- No time-based window: Doesn’t aggregate errors over time
Best Practices
- Let dedupe work automatically: It’s designed to handle common duplicate scenarios
- Use fingerprinting for logical grouping: Dedupe handles technical duplicates
- Monitor your error volume: Unusual spikes might indicate dedupe isn’t catching something
Debugging
To see when events are deduped, enable debug mode:Related
- Event Filters - Filter unwanted events
- Fingerprinting - Custom error grouping
- Sampling - Reduce event volume