Skip to content

Commit 16a6058

Browse files
committed
better trace id check
1 parent 3301011 commit 16a6058

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

sentry_sdk/client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -985,7 +985,7 @@ def _capture_metric(self, metric):
985985
metric["span_id"] = span.span_id
986986
else:
987987
propagation_context = isolation_scope.get_active_propagation_context()
988-
if propagation_context:
988+
if propagation_context and propagation_context.trace_id:
989989
metric["trace_id"] = propagation_context.trace_id
990990

991991
if isolation_scope._user is not None:

0 commit comments

Comments
 (0)