Skip to content

Commit 9985005

Browse files
committed
comment
1 parent 31c8886 commit 9985005

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

sentry_sdk/client.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -608,8 +608,12 @@ def _prepare_event(
608608
"before_send", data_category="error"
609609
)
610610

611-
# XXX: Should only reset if this is an exception
612-
DedupeIntegration.reset_last_seen()
611+
# If this is an exception, reset the DedupeIntegration. It still
612+
# remembers the dropped exception as the last exception, meaning
613+
# that if the same exception happens again and is not dropped
614+
# in before_send, it'd get dropped by DedupeIntegration.
615+
if event.get("exception"):
616+
DedupeIntegration.reset_last_seen()
613617

614618
event = new_event
615619

0 commit comments

Comments
 (0)