opentelemetry-lambda icon indicating copy to clipboard operation
opentelemetry-lambda copied to clipboard

Incorrect Parent ID Assignment in root span for Node Lambda Functions

Open alingamn opened this issue 2 years ago • 1 comments

Describe the bug In our application, we discovered an issue where the Node Lambda functions, which should ideally represent the root span, are being assigned a Parent ID.

This issue occurs when we create a Lambda function, add a node js layer, and send an exit call to downstream. According to the expected behavior, the Parent ID in the span generated from Lambda function should be null.

Steps to reproduce

  1. Create a Node js Lambda function.
  2. Add OpenTelemetry node js layer layer-nodejs/0.2.0 to the Lambda function.
  3. Send an exit call to SQS.
  4. Observe the Parent ID of the span generated for the lambda.

What did you expect to see? The Parent ID for the root span, being from the Node lambda function, should be null.

What did you see instead? Root span is being assigned a Parent ID instead of null.

What version of collector/language SDK version did you use? Node.js 18.x for lambda collector: v0.88.0

What language layer did you use? Node JS

cc: @pavankrish123 @svrnm @noltak3

alingamn avatar Nov 09 '23 22:11 alingamn

Do you have "Active Tracing" enabled for your lambda?

tylerbenson avatar Jan 18 '24 23:01 tylerbenson