Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
spous-ovl committed Aug 14, 2024
1 parent d6ff0b3 commit f6c8331
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions asgi_correlation_id/extensions/sentry.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ def set_transaction_id(correlation_id: str) -> None:
"""
import sentry_sdk

if sentry_sdk.VERSION >= '2.0.0':
scope = sentry_sdk.Scope.get_isolation_scope()
if sentry_sdk.VERSION >= '2.12.0':
scope = sentry_sdk.get_isolation_scope()
scope.set_tag('transaction_id', correlation_id)
else:
with sentry_sdk.configure_scope() as scope:
Expand Down

0 comments on commit f6c8331

Please sign in to comment.