We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2067363 commit f2b2dc3Copy full SHA for f2b2dc3
1 file changed
datadog_lambda/tracing.py
@@ -258,16 +258,15 @@ def extract_context_from_sqs_or_sns_event_or_context(
258
try:
259
dd_ctx = _extract_context_from_sqs_or_sns_record(record)
260
if apm_context is None:
261
- if not dd_ctx:
262
- apm_context = _extract_context_from_xray(record)
263
-
264
- elif dd_ctx and is_step_function_event(dd_ctx):
+ if dd_ctx and is_step_function_event(dd_ctx):
265
266
return extract_context_from_step_functions(dd_ctx, None)
267
except Exception:
268
logger.debug(
269
"Failed to extract Step Functions context from SQS/SNS event."
270
)
+ elif not dd_ctx:
+ apm_context = _extract_context_from_xray(record)
271
else:
272
apm_context = propagator.extract(dd_ctx)
273
except Exception as e:
0 commit comments