Skip to content

Commit 9dcc6ec

Browse files
committed
refactor: avoid extra allocation in eventbridge sqs parsing
1 parent 8fc0cd0 commit 9dcc6ec

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

datadog_lambda/tracing.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -395,7 +395,7 @@ def _extract_context_from_eventbridge_sqs_event(event):
395395
This is only possible if first record in `Records` contains a
396396
`body` field which contains the EventBridge `detail` as a JSON string.
397397
"""
398-
records = event.get("Records") or []
398+
records = event.get("Records")
399399
if not records:
400400
return None, False
401401

0 commit comments

Comments
 (0)