apm-agent-nodejs icon indicating copy to clipboard operation
apm-agent-nodejs copied to clipboard

Downstream Span links are categorised as "Incoming Link" in Kibana

Open lageorgem opened this issue 3 years ago • 0 comments

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

lageorgem avatar Jul 13 '22 11:07 lageorgem