Skip to content

Commit

Permalink
misc(browser): Log when event is dropped by Dedupe integration
Browse files Browse the repository at this point in the history
  • Loading branch information
kamilogorek committed Aug 31, 2021
1 parent fdee17e commit b68144d
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions packages/browser/src/integrations/dedupe.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { Event, EventProcessor, Exception, Hub, Integration, StackFrame } from '@sentry/types';
import { logger } from '@sentry/utils';

/** Deduplication filter */
export class Dedupe implements Integration {
Expand Down Expand Up @@ -27,6 +28,7 @@ export class Dedupe implements Integration {
// Juuust in case something goes wrong
try {
if (self._shouldDropEvent(currentEvent, self._previousEvent)) {
logger.warn(`Event dropped due to being a duplicate of previously captured event.`);
return null;
}
} catch (_oO) {
Expand Down

0 comments on commit b68144d

Please sign in to comment.