Skip to content

Commit 678d86b

Browse files
cleaner approach
1 parent cf737b0 commit 678d86b

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

datadog_lambda/tracing.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -70,11 +70,9 @@
7070

7171
def _dsm_set_context_sqs_or_sns_event(event, event_type):
7272
for record in event.get("Records", [])[1:]:
73-
arn = _dsm_get_source_arn(record, event_type)
74-
if not arn:
75-
continue
76-
context = extract_context_from_sqs_or_sns_record(record)
77-
_dsm_set_checkpoint(context, event_type, arn)
73+
if arn := _dsm_get_source_arn(record, event_type):
74+
context = extract_context_from_sqs_or_sns_record(record)
75+
_dsm_set_checkpoint(context, event_type, arn)
7876

7977

8078
def _dsm_set_context_kinesis_event(event):

0 commit comments

Comments
 (0)