elastic / elastic/apm-agent-nodejs
Downstream Span links are categorised as "Incoming Link" in Kibana
- Dominant language
- JavaScript
- Stars
- 594
- Forks
- 244
- Avg merge
- 1d 8h
- Merged PRs (30d)
- 16
Description
**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:
1. Create two AWS Lambda functions running NodeJS with APM installed
2. Have the first service push an SQS message with the `traceparent` message attribute that will be consumed by the second service
3. 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/start` from within the source code
- [ ] Starting node with `-r elastic-apm-node/start`
Contributor guide
Assessment
This issue has not been assessed yet.