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.
To build the layer and sample applications in this nodejs
folder:
First install dependencies:
npm install
Then build the project:
npm run build
You'll find the generated layer zip file at ./packages/layer/build/layer.zip
.
Sample applications are provided to show usage of the above layer.
- Application using AWS SDK - shows using the wrapper with an application using AWS SDK without code change.