Skip to content

Commit

Permalink
Make sentry scoping compatible with sentry-sdk 1.X
Browse files Browse the repository at this point in the history
  • Loading branch information
currycoder committed Nov 4, 2024
1 parent 4e6a563 commit 2bdcc82
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 16 deletions.
2 changes: 1 addition & 1 deletion mail/libraries/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,7 @@ def sort_dtos_by_date(input_dtos):

def log_to_sentry(message, extra=None, level="info"):
extra = extra or {}
with sentry_sdk.new_scope() as scope:
with sentry_sdk.push_scope() as scope:
for key, value in extra.items():
scope.set_extra(key, value)
sentry_sdk.capture_message(message, level=level)
Expand Down
15 changes: 0 additions & 15 deletions mail/tests/libraries/test_helpers.py

This file was deleted.

0 comments on commit 2bdcc82

Please sign in to comment.