Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions sentry_sdk/tracing_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -353,11 +353,10 @@ def add_http_request_source(
Adds OTel compatible source code information to a span for an outgoing HTTP request
"""
client = sentry_sdk.get_client()
if not client.is_active():
return

if isinstance(span, LegacySpan):
if not client.is_active():
return

# In the StreamedSpan case, we need to add the extra span information before
# the span finishes, so it's expected that this will be None. In the LegacySpan case,
# it should already be finished.
Expand Down
Loading