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, 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 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.