opentelemetry-lambda
opentelemetry-lambda copied to clipboard
Incorrect Parent ID Assignment in root span for Node Lambda Functions
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
- Create a Node js Lambda function.
- Add OpenTelemetry node js layer layer-nodejs/0.2.0 to the Lambda function.
- Send an exit call to SQS.
- 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
Do you have "Active Tracing" enabled for your lambda?