Deploy a Lambda Node JS that is backed by API Gateway and Cloudflare
Set the Auto Instrumentation config for the lambda with the following
Layer: arn:aws:lambda:ap-southeast-1:184161586896:layer:opentelemetry-nodejs-0_7_0:1
OTEL_TRACES_SAMPLER: ALWAYS_ON - > need this since the lambda is behind API Gateway
Call the lambda via APIGateway
Expected Result
Lambda will be able to send span and complete its transaction without errors
Actual Result
Lambda gives out "You can only call end() on a span once." Which causes internal server error but collector still receives the spans
Additional Details
OpenTelemetry Setup Code
No response
package.json
No response
Relevant log output
WARN: Can not execute the operation on ended Span {traceId: XXXXX, spanId: xxxxxxx}
2024-07-12T05:37:20.920Z XXXXX ERROR ${LAMBDA SERVICE} XXXXXX - You can only call end() on a span once.
1:38
2024-07-12T05:37:20.920Z XXXXX ERROR c${LAMBDA SERVICE} XXXXXX-691cb454cc0c71ed - You can only call end() on a span once.
What happened?
Steps to Reproduce
Deploy a Lambda Node JS that is backed by API Gateway and Cloudflare
Set the Auto Instrumentation config for the lambda with the following Layer: arn:aws:lambda:ap-southeast-1:184161586896:layer:opentelemetry-nodejs-0_7_0:1 OTEL_TRACES_SAMPLER: ALWAYS_ON - > need this since the lambda is behind API Gateway
Call the lambda via APIGateway
Expected Result
Lambda will be able to send span and complete its transaction without errors
Actual Result
Lambda gives out "You can only call end() on a span once." Which causes internal server error but collector still receives the spans
Additional Details
OpenTelemetry Setup Code
No response
package.json
No response
Relevant log output