Description
Is your feature request related to a problem? Please describe.
I have an API Server(nestjs
) that sends messages to AWS SQS.
A Lambda retrieves messages from the SQS queue and processes them.
I would like these two transactions to be appear as related
in the Service Map
Currently, I can see that the SQS Sender and SQS Receiver are linked via Span links
But I would prefer the Lambda function to be shown as a the child of API Server.
Describe the solution you'd like
I have reviewed the source code of lib/lambda.js
apm-agent-nodejs/lib/lambda.js
Lines 708 to 741 in 2d084c5
I noticed that only API Gateway and ELB trigger types are register as childOf
the traceparent
.
It would be ideal to use the traceparent
injected into SQS Message Attribute to achieve this behavior.
Describe alternatives you've considered
I tried using agent.startTransaction
API, but this left the messaging
RECEIVED blabla
transaction dangling.
Additional context
Is there any specific reason why SQS Message exchanges are linked only via span links
rather than using parent-child transaction relationships?