EventBridge not propagating X-Ray trace header to SQS target

0

I have an eventbridge rule with an SQS target, and the lambda function that puts the event on the bus is configured to use xray (traces lead up to eventbridge in xray, so this is working fine). In the SQS messages (received with a ReceiveMessageCommand) there is no AWSTraceHeader attribute, so I cannot continue the trace downstream. I have added an identical rule with lambda target with tracing to test if the trace is propagated correctly, and this is the case, I have a lambda node linked after the events node in the service map.

I read that eventbridge should propagate trace headers to SQS targets, mentioned here: https://aws.amazon.com/about-aws/whats-new/2021/03/amazon-eventbridge-now-supports-propagation-of-x-ray-trace-context/?nc1=h_ls

Is this actually the case? If so, is there anything I am missing for this to work?

2 Answers
0
Accepted Answer

Just to follow up, I figured out what was missing, I wasn't explicitly requesting the AWSTraceHeader in my SQS ReceiveMessage command, upon requesting it the trace data is indeed present.

answered a year ago
0

Is it possible that the upstream of EventBridge does not inject correct xray trace header? Could you print the http header X-Amzn-Trace-Id of EventBridge request?

answered a year ago
  • No, as I tried adding a lambda target and the trace header is propagated correctly in the case of lambda targets. I'm using the nodejs xray wrapper on the upstream, I don't know how to print the header but I'm 100% sure that it's correct

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions