Skip to content

Commit b7462df

Browse files
committed
account for missing redrive count
1 parent 93fd23f commit b7462df

File tree

2 files changed

+1
-2
lines changed

2 files changed

+1
-2
lines changed

datadog_lambda/tracing.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -392,7 +392,7 @@ def _generate_sfn_parent_id(context: dict) -> int:
392392
version of the Lambda layer that doesn't use this value for its parentID generation.
393393
"""
394394
execution_id = context.get("Execution").get("Id")
395-
redrive_count = context.get("Execution").get("RedriveCount")
395+
redrive_count = context.get("Execution").get("RedriveCount", 0)
396396
state_name = context.get("State").get("Name")
397397
state_entered_time = context.get("State").get("EnteredTime")
398398

tests/test_tracing.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -623,7 +623,6 @@ def test_step_function_trace_data(self):
623623
"Name": "72a7ca3e-901c-41bb-b5a3-5f279b92a316",
624624
"RoleArn": "arn:aws:iam::425362996713:role/service-role/StepFunctions-abhinav-activity-state-machine-role-22jpbgl6j",
625625
"StartTime": "2024-12-04T19:38:04.069Z",
626-
"RedriveCount": 0,
627626
},
628627
"State": {
629628
"Name": "Lambda Invoke",

0 commit comments

Comments
 (0)