This is a community fork of aws-observability/aws-otel-lambda. It publishes a custom collector-only Lambda layer that includes the decouple processor, which was not accepted into the upstream project. All other layers (Python, Java, Node.js, .NET) are unmodified — use the official AWS layers for those.
The decouple processor allows a Lambda function to finish its invocation before the OTel collector has finished exporting telemetry. This significantly reduces the latency impact of tracing on your Lambda response times, at the cost of slightly higher billed duration.
From the decouple processor docs:
This processor decouples the receiver and exporter ends of the pipeline. This allows the lambda function to finish before traces/metrics/logs have been exported by the collector.
When combined with the batch processor, this is the recommended pattern for minimising both latency and export costs. Use decouple as the last processor in your pipeline:
processors:
batch:
decouple:
service:
pipelines:
traces:
receivers: [otlp]
processors: [batch, decouple]
exporters: [awsxray]Find the current layer ARNs for each region on the GitHub Releases page.
Add the ARN for your region and architecture as a layer on your Lambda function:
aws lambda update-function-configuration \
--function-name my-function \
--layers arn:aws:lambda:us-east-1:YOUR_ACCOUNT:layer:aws-otel-collector-amd64-ver-0-138-0:1Or in Terraform:
resource "aws_lambda_function" "example" {
# ...
layers = ["arn:aws:lambda:us-east-1:ACCOUNT:layer:aws-otel-collector-amd64-ver-0-138-0:1"]
}The layer is compatible with provided.al2 and provided.al2023 runtimes (Go, .NET, Rust, or any custom runtime).
| Receivers | Processors | Exporters | Extensions |
|---|---|---|---|
otlpreceiver |
decoupleprocessor ✨ |
awsemfexporter |
sigv4authextension |
awsxrayexporter |
|||
prometheusremotewriteexporter |
|||
debugexporter |
|||
otlpexporter |
|||
otlphttpexporter |
✨ Added by this fork — not available in the official AWS layer.
Releases are published automatically when a v* tag is pushed. Each release includes:
- Layer ARNs for all supported regions (both
amd64andarm64) - The layer zip files as downloadable artifacts (for self-hosting)
See the Releases page for all versions.
git tag v0.138.0
git push origin v0.138.0This triggers the Publish Collector Layer workflow, which builds, tests, and publishes the layer to all configured AWS regions.
A weekly sync workflow runs every Monday and either fast-forwards main from aws-observability/aws-otel-lambda or opens a PR if there are conflicts.
See CONTRIBUTING for information on reporting security issues.
Apache-2.0 — see LICENSE.
As a downstream Repo of opentelemetry-lambda, aws-otel-lambda publishes AWS managed OpenTelemetry Lambda layers that are preconfigured for use with AWS services and bundle the reduced ADOT Collector. Users can onboard to OpenTelemetry in their existing Lambda functions by adding these ready-made layers directly.
- Python layer aws-otel-python-<amd64|arm64>-ver-1-32-0 contains OpenTelemetry Python
v1.32.0and ADOT Collector for Lambdav0.43.0 - Nodejs layer aws-otel-nodejs-<amd64|arm64>-ver-1-30-0 contains OpenTelemetry JavaScript Core
v1.30.0with AWS Lambda Instrumentationv0.50.3and ADOT Collector for Lambdav0.43.0 - Java-Wrapper layer aws-otel-java-wrapper-<amd64|arm64>-ver-1-32-0 contains OpenTelemetry Java
v1.32.0and ADOT Collector for Lambdav0.43.0 - Java-Agent layer aws-otel-java-agent-<amd64|arm64>-ver-1-32-0 contains AWS Distro for OpenTelemetry Java Instrumentation
v1.32.0and ADOT Collector for Lambdav0.43.0 - Collector layer aws-otel-collector-<amd64|arm64>-ver-0-117-0 contains ADOT Collector for Lambda
v0.43.0. Compatible with .NET and Go runtimes.
We provide SAM and Terraform sample applications for AWS managed OpenTelemetry Lambda layers. You can play with these samples by the following:
-
Install AWS Cli, AWS SAM, Terraform, and configure AWS credentials correctly.
-
Checkout the current Repo by
git clone --recurse-submodules https://github.com/aws-observability/aws-otel-lambda.git -
Go to the language folder, such as
python,java, run./build.sh -
Go to a sample application folder, such as
sample-apps/aws-sdk/deploy/wrapper/. -
Deploy sample application by,
For Terraform sample application
terraform init terraform apply -auto-approve
To Deploy SAM sample application, navigate to sample-apps/python-aws-sdk-aiohttp-sam/ and run.
./run.sh
This table represents the components that the ADOT Lambda Layer will support and can be used in the custom configuration for ADOT collector on Lambda. The highlighted components below are developed by AWS in-house.
| Receiver | Exporter | Extensions |
|---|---|---|
| otlpreceiver | awsemfexporter |
sigv4authextension |
awsxrayexporter |
||
| prometheusremotewriteexporter | ||
| debugexporter | ||
| otlpexporter | ||
| otlphttpexporter |
See CONTRIBUTING for more information.
Please note that as per policy, we're providing support via GitHub on a best effort basis. However, if you have AWS Enterprise Support you can create a ticket and we will provide direct support within the respective SLAs.
This project is licensed under the Apache-2.0 License.