File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -89,7 +89,7 @@ def _convert_xray_sampling(xray_sampled):
8989 return SamplingPriority .USER_KEEP if xray_sampled else SamplingPriority .USER_REJECT
9090
9191
92- def _get_xray_trace_context () -> Optional [ Context ] :
92+ def _get_xray_trace_context ():
9393 if not is_lambda_context ():
9494 return None
9595
Original file line number Diff line number Diff line change 1414from datadog_lambda .constants import (
1515 SamplingPriority ,
1616 TraceHeader ,
17+ TraceContextSource ,
1718 XraySubsegment ,
1819)
1920from datadog_lambda .tracing import (
@@ -854,6 +855,10 @@ def test_mixed_parent_context_when_merging(self):
854855 self .mock_activate .assert_called ()
855856 self .mock_activate .assert_has_calls ([call (expected_context )])
856857
858+ def test_set_dd_trace_py_root_no_span_id (self ):
859+ os .environ ["_X_AMZN_TRACE_ID" ] = "Root=1-5e272390-8c398be037738dc042009320"
860+ set_dd_trace_py_root (TraceContextSource .EVENT , True )
861+
857862
858863class TestAuthorizerInferredSpans (unittest .TestCase ):
859864 def setUp (self ):
You can’t perform that action at this time.
0 commit comments