Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

misc(browser): Log when event is dropped by Dedupe integration #3943

Merged
merged 2 commits into from
Aug 31, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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.`);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

return null;
}
} catch (_oO) {
Expand Down
2 changes: 2 additions & 0 deletions packages/integrations/src/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