Skip to content

Latest commit

 

History

History
 
 

nodejs

OpenTelemetry Lambda NodeJS

Layer for running NodeJS applications on AWS Lambda with OpenTelemetry. Adding the layer and pointing to it with the AWS_LAMBDA_EXEC_WRAPPER environment variable will initialize OpenTelemetry, enabling tracing with no code change.

To use, add the layer to your function configuration and then set AWS_LAMBDA_EXEC_WRAPPER to /opt/otel-handler.

AWS SDK v2 instrumentation is also included and loaded automatically if you use the AWS SDK v2.

Building

To build the layer and sample applications, in this nodejs folder, run

npm install

This will download all dependencies and compile all code. The layer zip file will be present at ./packages/layer/build/layer.zip.

Sample applications

Sample applications are provided to show usage of the above layer.