Skip to content

Commit 801b6d0

Browse files
committed
feat: Better dedupe event description
1 parent c73ffa1 commit 801b6d0

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
## Unreleased
44

5+
- [browser] feat: Better dedupe integration event description
6+
57
## 4.0.2
68

79
- [browser] fix: Dont filter captured messages when they have no stacktraces

packages/browser/src/integrations/dedupe.ts

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import { configureScope, logger } from '@sentry/core';
22
import { Integration, SentryEvent, SentryException, StackFrame } from '@sentry/types';
3+
import { getEventDescription } from '@sentry/utils/misc';
34

45
/** Deduplication filter */
56
export class Dedupe implements Integration {
@@ -41,14 +42,18 @@ export class Dedupe implements Integration {
4142

4243
if (this.isSameMessageEvent(currentEvent, previousEvent)) {
4344
logger.warn(
44-
`Event dropped due to being a duplicate of previous event (same message).\n Event: ${currentEvent.event_id}`,
45+
`Event dropped due to being a duplicate of previous event (same message).\nEvent: ${getEventDescription(
46+
currentEvent,
47+
)}`,
4548
);
4649
return true;
4750
}
4851

4952
if (this.isSameExceptionEvent(currentEvent, previousEvent)) {
5053
logger.warn(
51-
`Event dropped due to being a duplicate of previous event (same exception).\n Event: ${currentEvent.event_id}`,
54+
`Event dropped due to being a duplicate of previous event (same exception).\nEvent: ${getEventDescription(
55+
currentEvent,
56+
)}`,
5257
);
5358
return true;
5459
}

0 commit comments

Comments
 (0)