Skip to content

Commit

Permalink
ref: Stop using Hub in tracing_utils
Browse files Browse the repository at this point in the history
Get the client via `sentry_sdk.get_client()` instead.

Prerequisite for #3265
  • Loading branch information
szokeasaurusrex committed Jul 10, 2024
1 parent 2cb2dca commit a9cff08
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions sentry_sdk/tracing_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -492,9 +492,9 @@ def from_options(cls, scope):
third_party_items = ""
mutable = False

client = sentry_sdk.Hub.current.client
client = sentry_sdk.get_client()

if client is None or scope._propagation_context is None:
if not client.is_active() or scope._propagation_context is None:
return Baggage(sentry_items)

options = client.options
Expand Down

0 comments on commit a9cff08

Please sign in to comment.