Skip to content

Commit 1e81cd0

Browse files
caught sns -> sqs bug
1 parent 39b42fc commit 1e81cd0

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

datadog_lambda/tracing.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -275,7 +275,8 @@ def extract_context_from_sqs_or_sns_event_or_context(event, lambda_context):
275275
msg_attributes = first_record.get("messageAttributes")
276276
if msg_attributes is None:
277277
sns_record = first_record.get("Sns") or {}
278-
arn = sns_record.get("TopicArn", "")
278+
if not is_sqs:
279+
arn = sns_record.get("TopicArn", "")
279280
msg_attributes = sns_record.get("MessageAttributes") or {}
280281
dd_payload = msg_attributes.get("_datadog")
281282
if dd_payload:

0 commit comments

Comments
 (0)