We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent bd50a8e commit 2b30addCopy full SHA for 2b30add
1 file changed
sentry_sdk/tracing_utils.py
@@ -353,11 +353,10 @@ def add_http_request_source(
353
Adds OTel compatible source code information to a span for an outgoing HTTP request
354
"""
355
client = sentry_sdk.get_client()
356
+ if not client.is_active():
357
+ return
358
359
if isinstance(span, LegacySpan):
- if not client.is_active():
- return
360
-
361
# In the StreamedSpan case, we need to add the extra span information before
362
# the span finishes, so it's expected that this will be None. In the LegacySpan case,
363
# it should already be finished.
0 commit comments