File tree Expand file tree Collapse file tree 1 file changed +17
-0
lines changed
packages/browser/src/integrations Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -61,6 +61,13 @@ export class Dedupe implements Integration {
6161 return true ;
6262 }
6363
64+ if ( this . isSameFingerprint ( event ) ) {
65+ logger . warn (
66+ `Event dropped due to being a duplicate of previous event (same fingerprint).\n Event: ${ event . event_id } ` ,
67+ ) ;
68+ return true ;
69+ }
70+
6471 return false ;
6572 }
6673
@@ -144,4 +151,14 @@ export class Dedupe implements Integration {
144151
145152 return this . isSameStacktrace ( event ) ;
146153 }
154+
155+ /** JSDoc */
156+ private isSameFingerprint ( event : SentryEvent ) : boolean {
157+ if ( ! this . previousEvent ) {
158+ return false ;
159+ }
160+
161+ return Boolean ( event . fingerprint && this . previousEvent . fingerprint ) &&
162+ JSON . stringify ( event . fingerprint ) === JSON . stringify ( this . previousEvent . fingerprint )
163+ }
147164}
You can’t perform that action at this time.
0 commit comments