Skip to content

Commit 189ab05

Browse files
committed
Fix extractor issue
1 parent b50065e commit 189ab05

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
@@ -187,7 +187,8 @@ def extract_context_from_sqs_or_sns_event_or_context(event, lambda_context):
187187
try:
188188
first_record = event["Records"][0]
189189
msg_attributes = first_record.get(
190-
"messageAttributes", first_record.get("MessageAttributes", {})
190+
"messageAttributes",
191+
first_record.get("Sns", {}).get("MessageAttributes", {}),
191192
)
192193
dd_payload = msg_attributes.get("_datadog", {})
193194
dd_json_data = dd_payload.get("stringValue", dd_payload.get("Value", r"{}"))

0 commit comments

Comments
 (0)