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

ログインしていません。 ログイン 回答を投稿する。

優れた回答とは、質問に明確に答え、建設的なフィードバックを提供し、質問者の専門分野におけるスキルの向上を促すものです。

質問に答えるためのガイドライン

関連するコンテンツ