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 Respuestas
0
Respuesta aceptada

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.

respondido hace un año
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?

respondido hace un año
  • 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

No has iniciado sesión. Iniciar sesión para publicar una respuesta.

Una buena respuesta responde claramente a la pregunta, proporciona comentarios constructivos y fomenta el crecimiento profesional en la persona que hace la pregunta.

Pautas para responder preguntas