Skip to content

Commit 0c810d9

Browse files
committed
cleanup
1 parent 98c0bf6 commit 0c810d9

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

sentry_sdk/integrations/dedupe.py

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ class DedupeIntegration(Integration):
2525

2626
def __init__(self):
2727
# type: () -> None
28-
self._last_fingerprint = ContextVar("last-fingerprint", default=None)
28+
self._last_seen = ContextVar("last-seen", default=None)
2929
self.in_app_include = [] # type: List[str]
3030
self.in_app_exclude = [] # type: List[str]
3131
self.project_root = None # type: Optional[str]
@@ -109,7 +109,7 @@ def processor(event, hint):
109109
return event
110110

111111
fingerprint = integration._create_exception_fingerprint(exc_info)
112-
last_fingerprint = integration._last_fingerprint.get()
112+
last_fingerprint = integration._last_seen.get()
113113

114114
if fingerprint == last_fingerprint:
115115
logger.info(
@@ -118,21 +118,17 @@ def processor(event, hint):
118118
)
119119
return None
120120

121-
# Store this fingerprint as the last seen one
122-
integration._last_fingerprint.set(fingerprint)
121+
integration._last_seen.set(fingerprint)
123122
return event
124123

125124
@staticmethod
126125
def reset_last_seen():
127126
# type: () -> None
128127
"""
129128
Resets the deduplication state, clearing the last seen exception fingerprint.
130-
131-
This maintains the existing public API while working with the new
132-
fingerprint-based implementation.
133129
"""
134130
integration = sentry_sdk.get_client().get_integration(DedupeIntegration)
135131
if integration is None:
136132
return
137133

138-
integration._last_fingerprint.set(None)
134+
integration._last_seen.set(None)

0 commit comments

Comments
 (0)