We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5efa060 commit 639318fCopy full SHA for 639318f
1 file changed
sentry_sdk/tracing_utils.py
@@ -382,11 +382,10 @@ def add_query_source(
382
Adds OTel compatible source code information to a database query span
383
"""
384
client = sentry_sdk.get_client()
385
+ if not client.is_active():
386
+ return
387
388
if isinstance(span, LegacySpan):
- if not client.is_active():
- return
389
-
390
# In the StreamedSpan case, we need to add the extra span information before
391
# the span finishes, so it's expected that this will be None. In the LegacySpan case,
392
# it should already be finished.
0 commit comments