File tree Expand file tree Collapse file tree 2 files changed +6
-1
lines changed Expand file tree Collapse file tree 2 files changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -89,7 +89,7 @@ def _convert_xray_sampling(xray_sampled):
89
89
return SamplingPriority .USER_KEEP if xray_sampled else SamplingPriority .USER_REJECT
90
90
91
91
92
- def _get_xray_trace_context () -> Optional [ Context ] :
92
+ def _get_xray_trace_context ():
93
93
if not is_lambda_context ():
94
94
return None
95
95
Original file line number Diff line number Diff line change 14
14
from datadog_lambda .constants import (
15
15
SamplingPriority ,
16
16
TraceHeader ,
17
+ TraceContextSource ,
17
18
XraySubsegment ,
18
19
)
19
20
from datadog_lambda .tracing import (
@@ -854,6 +855,10 @@ def test_mixed_parent_context_when_merging(self):
854
855
self .mock_activate .assert_called ()
855
856
self .mock_activate .assert_has_calls ([call (expected_context )])
856
857
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
+
857
862
858
863
class TestAuthorizerInferredSpans (unittest .TestCase ):
859
864
def setUp (self ):
You can’t perform that action at this time.
0 commit comments