Make single AWS XRay Trace Id by propagating it end to end

0

I have use-case where the Producer Java lambda publishes file messages to SQS and Consumer Nodejs consumes them. Producer side of X-ray is enabled in serverless.yml; displays a Service map with all AWS components with a new Trace Id. The Consumer side of Nodejs lambda; is enabled with another Trace Id. I see a single service map, but with two clients. I guess it is because of the 2 separate Trace Ids. Is it possible to make single Trace Id by propagating it end to end?

Ashruf
質問済み 2年前1328ビュー
3回答
1

Hi, it is not possible at the moment. If you are using SQS than Lambda can get more than one Message per invocation. Each Messages has it´s own TracId associated and so it is not possible to assign on single traceId to the receiver Lambda.

AWS
Marco
回答済み 2年前
0

Thanks for asking this question. Unfortunately this is not yet supported. Please see this open issue on the X-Ray Node JS SDK which explains why this is a difficult problem to solve:

https://github.com/aws/aws-xray-sdk-node/issues/208

AWS
回答済み 2年前
0

The Producer side sends the messages to SQS using sqs.sendMessageBatch(new SendMessageBatchRequest(queueUrl)). The SQS can be seen in the Service graph, with its Trace Id.

The Consumer side is consuming messages from SQS. Yet the service graph does not show SQS with its Trace Id.

Is there a way/workaround to show SQS on the Consumer side of Trace?

Ashruf
回答済み 2年前

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

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

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

関連するコンテンツ