File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed
Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -258,16 +258,15 @@ def extract_context_from_sqs_or_sns_event_or_context(
258258 try :
259259 dd_ctx = _extract_context_from_sqs_or_sns_record (record )
260260 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 ):
261+ if dd_ctx and is_step_function_event (dd_ctx ):
265262 try :
266263 return extract_context_from_step_functions (dd_ctx , None )
267264 except Exception :
268265 logger .debug (
269266 "Failed to extract Step Functions context from SQS/SNS event."
270267 )
268+ elif not dd_ctx :
269+ apm_context = _extract_context_from_xray (record )
271270 else :
272271 apm_context = propagator .extract (dd_ctx )
273272 except Exception as e :
You can’t perform that action at this time.
0 commit comments