@@ -408,15 +408,16 @@ def test_extracts_durable_trace_context_from_latest_checkpoint_operation_map(sel
408408 "CheckpointToken" : "token" ,
409409 "InitialExecutionState" : {
410410 "Operations" : {
411- "0" : {
412- "Type" : "EXECUTION" ,
413- "ExecutionDetails" : {
414- "InputPayload" : {"order_id" : "ORD-300" }
415- },
416- },
411+ "0" : {"Type" : "EXECUTION" },
417412 "1" : {
418413 "Name" : "_datadog_0" ,
419- "StepDetails" : {"Result" : {TraceHeader .TRACE_ID : "999" }},
414+ "StepDetails" : {
415+ "Result" : {
416+ TraceHeader .TRACE_ID : "999" ,
417+ TraceHeader .PARENT_ID : "888" ,
418+ TraceHeader .SAMPLING_PRIORITY : "1" ,
419+ }
420+ },
420421 },
421422 "2" : {
422423 "Name" : "_datadog_1" ,
@@ -431,35 +432,7 @@ def test_extracts_durable_trace_context_from_latest_checkpoint_operation_map(sel
431432 self .assertEqual (source , "event" )
432433 self .assertEqual (ctx , Context (trace_id = 123 , span_id = 321 , sampling_priority = 1 ))
433434
434- @with_trace_propagation_style ("datadog" )
435- def test_extracts_durable_trace_context_from_input_payload_when_no_checkpoint (self ):
436- lambda_ctx = get_mock_context ()
437- headers = {
438- TraceHeader .TRACE_ID : "777" ,
439- TraceHeader .PARENT_ID : "888" ,
440- TraceHeader .SAMPLING_PRIORITY : "1" ,
441- }
442-
443- event = {
444- "DurableExecutionArn" : "arn:aws:lambda:us-east-2:123456789012:function:demo:1/durable-execution/demo/first" ,
445- "CheckpointToken" : "token" ,
446- "InitialExecutionState" : {
447- "Operations" : {
448- "0" : {
449- "Type" : "EXECUTION" ,
450- "ExecutionDetails" : {
451- "InputPayload" : json .dumps ({"headers" : headers })
452- },
453- }
454- }
455- },
456- }
457-
458- ctx , source , _ = extract_dd_trace_context (event , lambda_ctx )
459-
460- self .assertEqual (source , "event" )
461- self .assertEqual (ctx , Context (trace_id = 777 , span_id = 888 , sampling_priority = 1 ))
462-
435+
463436 @with_trace_propagation_style ("datadog" )
464437 def test_with_extractor_function (self ):
465438 def extractor_foo (event , context ):
0 commit comments