Skip to content

Make DedupeIntegration more memory efficient. #4446

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

Draft
wants to merge 10 commits into
base: master
Choose a base branch
from
7 changes: 4 additions & 3 deletions sentry_sdk/integrations/dedupe.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,11 @@ def processor(event, hint):
if exc_info is None:
return event

exc = exc_info[1]
if integration._last_seen.get(None) is exc:
exc_id = id(exc_info[1])
if integration._last_seen.get(None) == exc_id:
return None
integration._last_seen.set(exc)

integration._last_seen.set(exc_id)
return event

@staticmethod
Expand Down
Loading