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 ea0a09e commit 3b3d981Copy full SHA for 3b3d981
datadog_lambda/tracing.py
@@ -411,6 +411,9 @@ def is_legacy_lambda_step_function(event):
411
"""
412
Check if the event is a step function that called a legacy lambda
413
414
+ if not isinstance(event, dict):
415
+ return False
416
+
417
event = event.get("Payload", {})
418
return "Execution" in event and "StateMachine" in event and "State" in event
419
tests/test_tracing.py
@@ -678,6 +678,9 @@ def test_is_legacy_lambda_step_function(self):
678
}
679
self.assertFalse(is_legacy_lambda_step_function(sf_event))
680
681
+ other_event = ["foo", "bar"]
682
+ self.assertFalse(is_legacy_lambda_step_function(other_event))
683
684
685
class TestXRayContextConversion(unittest.TestCase):
686
def test_convert_xray_trace_id(self):
0 commit comments