Skip to content

Commit d7daf0d

Browse files
committed
extract context in eventbridge sqs case
1 parent 55ff075 commit d7daf0d

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

datadog_lambda/tracing.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -314,6 +314,14 @@ def _extract_context_from_eventbridge_sqs_event(event):
314314
body = json.loads(body_str)
315315
detail = body.get("detail")
316316
dd_context = detail.get("_datadog")
317+
if is_step_function_event(dd_context):
318+
try:
319+
return extract_context_from_step_functions(detail, None)
320+
except Exception:
321+
logger.debug(
322+
"Failed to extract Step Functions context from EventBridge to SQS event."
323+
)
324+
317325
return propagator.extract(dd_context)
318326

319327

0 commit comments

Comments
 (0)