Skip to content

Commit 77b0723

Browse files
error handling
1 parent 81d4388 commit 77b0723

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

datadog_lambda/tracing.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -309,7 +309,9 @@ def extract_context_from_sqs_or_sns_event_or_context(event, lambda_context):
309309
)
310310
if is_sqs:
311311
return _extract_context(dd_data, "sqs", arn)
312-
return _extract_context(dd_data, "sns", sns_record.get(("TopicArn")))
312+
return _extract_context(
313+
dd_data, "sns", sns_record.get(("TopicArn"), "")
314+
)
313315
else:
314316
# Handle case where trace context is injected into attributes.AWSTraceHeader
315317
# example: Root=1-654321ab-000000001234567890abcdef;Parent=0123456789abcdef;Sampled=1

0 commit comments

Comments
 (0)