AWS X-ray with SQS fanout pattern
Asked Answered
O

2

7

I am trying to use x-ray to trace requests which use an SNS-SQS fanout pattern.

The request comes from API GW, lambda proxy integration, published to SNS and delivered to a subscribed SQS which has a lambda trigger which receives the messages for further processing.

However the trace stops at SNS.

Out answered 30/5, 2019 at 11:9 Comment(2)
how did you manage to work this out? Is there any workaround to do this till AWS supports this architecture?Stinker
we didn't see any x-ray metadata past the SQS message and inferred that fanout wasn't supported. In the end we built our own tracing as we also wanted to trace everything not just sampling like x-ray does,Out
E
2

Unfortunately we do not support this architecture today. The issue is that the trace information from the starting request (APIG in this case) is lost once the SNS message is invoked. There currently isn't a workaround for this behavior. We are working with SNS and SQS to provide a better user experience and support for these cases. Please stay tuned for more.

Edifice answered 3/6, 2019 at 21:41 Comment(1)
Is there any update on the support of this architecture? Also please let me know if there any github issue page where I can track the updates on support of this architecture myself.Stinker
S
1

I understand things have moved recently, the context is now forwarded over SQS.

https://aws.amazon.com/about-aws/whats-new/2022/11/aws-x-ray-trace-linking-event-driven-applications-amazon-sqs-lambda/

Seale answered 2/7, 2023 at 8:39 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.