This package includes the following three components
- AWS Lambda Layer implementation for supporting Application Signals in AWS Lambda.
- Lambda Sample App with AWS SDK to demonstrate Application Signals telemetry data generated by Lambda Layer.
- Terraform script for deploy the sample app with Lambda layer built from the local package.
Run the following command in the root director to build both NodeJS Lambda Layer and Sample App.
Note: Make sure to install NodeJS 16+ to build the layer. Lower version of NodJS runtime is not supported by AWS Lambda anymore.
./lambda-layer/build.sh
-
Run the following command in the root director
./scripts/build_and_install_distro.sh
-
Run to the following steps in
${root}/lambda-layer/packages/layer
directornpm install npm run compile
Go to ${root}/lambda-layer/sample-apps/aws-sdk
director,
- run
npm install
. - run
terraform init
andterraform apply
.
The lambda function(aws-opentelemetry-distro-nodejs
) will be initialized and the URL for an API Gateway invoking the Lambda
will be displayed at the end. Send a request to the URL in a browser or using curl to execute the function. Then,
navigate to Lambda function's Monitoring page.
You will see a log stream with an event time and Traces data corresponding to when you issued the request,
open it and you can find
information about the exported spans in the log stream.