apm-agent-nodejs
apm-agent-nodejs copied to clipboard
Downstream Span links are categorised as "Incoming Link" in Kibana
Describe the bug
When sending an SQS event from a Lambda function with the traceparent message attribute, the downstream service appears in the "Incoming Links" section of the span links, while an upstream service will appear in the "Outgoing Links" section.
To Reproduce
Steps to reproduce the behavior:
- Create two AWS Lambda functions running NodeJS with APM installed
- Have the first service push an SQS message with the
traceparentmessage attribute that will be consumed by the second service - Observe how in Kibana, in the Span Links section for the Service 1 transaction, Service 2 will appear as "Incoming Link", while for the Service 2 transaction, Service 1 will appear as "Outgoing Link"
Expected behavior
The upstream service is categorised as "incoming link" and the downstream service is categorised as "outgoing link"
Environment (please complete the following information)
- OS: [e.g. Linux] Linux
- Node.js version: AWS_Lambda_nodejs16.x 16.15.0
- APM Server version: Elastic Cloud 8.3.2
- Agent version: 3.36.0
How are you starting the agent? (please tick one of the boxes)
- [x] Calling
agent.start()directly (e.g.require('elastic-apm-node').start(...)) - [ ] Requiring
elastic-apm-node/startfrom within the source code - [ ] Starting node with
-r elastic-apm-node/start