SQS node not present in Xray Service map

0

I have a SQS queue that is a trigger for my lambda function. The lambda has powertools installed in the lambda layer and is currently sending traces to Xray. there is another SQS at the destination of the lambda. The service map created has all services integrated as nodes except the SQS that invokes the lambda. i want the service map to display the start point as sqs instead of client that it currently shows and has not much information about.

1回答
1

If automatic integration doesn't capture the SQS queue as expected, consider manually annotating the trace within your Lambda function to include the SQS queue information. Use the X-Ray SDK to add annotations or metadata to the trace, specifying the SQS queue name or other identifiers.

import boto3
from aws_lambda_powertools import Tracer

tracer = Tracer()

@tracer.capture_lambda_handler
def lambda_handler(event, context):
    # Your code here
    # Manually annotate the trace with SQS details
    tracer.put_annotation("SQSQueue", "YourSQSQueueName")
profile picture
エキスパート
回答済み 1ヶ月前
profile picture
エキスパート
Artem
レビュー済み 1ヶ月前

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

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

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

関連するコンテンツ