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 個答案
0
已接受的答案

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.

已回答 1 年前
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?

已回答 1 年前
  • 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

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南