We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f5812d5 commit f8d6173Copy full SHA for f8d6173
datadog_lambda/tracing.py
@@ -89,7 +89,7 @@ def _convert_xray_sampling(xray_sampled):
89
return SamplingPriority.USER_KEEP if xray_sampled else SamplingPriority.USER_REJECT
90
91
92
-def _get_xray_trace_context():
+def _get_xray_trace_context() -> Optional[Context]:
93
if not is_lambda_context():
94
return None
95
@@ -604,7 +604,7 @@ def set_dd_trace_py_root(trace_context_source, merge_xray_traces):
604
)
605
if merge_xray_traces:
606
xray_context = _get_xray_trace_context()
607
- if xray_context.span_id:
+ if xray_context and xray_context.span_id:
608
context.span_id = xray_context.span_id
609
610
tracer.context_provider.activate(context)
0 commit comments