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 Antworten
0
Akzeptierte Antwort

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.

beantwortet vor einem Jahr
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?

beantwortet vor einem Jahr
  • 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

Du bist nicht angemeldet. Anmelden um eine Antwort zu veröffentlichen.

Eine gute Antwort beantwortet die Frage klar, gibt konstruktives Feedback und fördert die berufliche Weiterentwicklung des Fragenstellers.

Richtlinien für die Beantwortung von Fragen