Skip to content

Commit 9c516f5

Browse files
authored
misc(browser): Log when event is dropped by Dedupe integration (getsentry#3943)
1 parent 156f4b5 commit 9c516f5

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

packages/browser/src/integrations/dedupe.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import { Event, EventProcessor, Exception, Hub, Integration, StackFrame } from '@sentry/types';
2+
import { logger } from '@sentry/utils';
23

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

packages/integrations/src/dedupe.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import { Event, EventProcessor, Exception, Hub, Integration, StackFrame } from '@sentry/types';
2+
import { logger } from '@sentry/utils';
23

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

0 commit comments

Comments
 (0)