When to Use the ADOT Lambda Layer
The ADOT Lambda Layer is the recommended Lambda ingestion path when your function runtime has a layer. It is a good fit when you want to:- Send traces, metrics, and logs from AWS Lambda directly to Bronto over OTLP, without going through CloudWatch
- Avoid CloudWatch ingestion fees on the telemetry you export
- Use the same
service.name/service.namespaceidentity across Lambda, ECS, and EKS workloads
The layer exports logs written through your logging framework once it is bridged to OpenTelemetry (see Setup). Lambda’s automatic
stdout / stderr capture goes to CloudWatch Logs by default — to also ship those, use the CloudWatch Log Forwarder or set the function’s log destination to Amazon Data Firehose.Supported Runtimes
The layer is the AWS Lambda Layer for OpenTelemetry. It runs the ADOT SDK inside your function and exports straight to an OTLP endpoint, with no Collector in the function.
For Go, Ruby, and custom runtimes there is no layer. Instrument the function with the OpenTelemetry SDK for your language and export straight to Bronto, or use the CloudWatch Log Forwarder. For non-Lambda compute, see ADOT — ECS / EKS or the overview.
Bronto OTLP Endpoints
The layer exports OTLP over HTTP with protobuf encoding (
http/protobuf). Every request needs the header:
Setup
Step 1 — Add the layer
Layer ARNs are specific to the region and runtime. Find the ARN for your region and runtime under ADOT Lambda Layer ARNs in the ADOT Lambda documentation. Via AWS CLI:layer.zip from the latest release of the runtime’s ADOT repository and unzip it into /opt in the image.
Step 2 — Point the layer at Bronto
Set these environment variables on the function, for every runtime:OTEL_METRICS_EXPORTERandOTEL_LOGS_EXPORTER— the layer turns metrics and logs off by default. Setting them tootlpsends them to Bronto.OTEL_TRACES_SAMPLER=always_on— by default the layer follows the sampling decision in Lambda’s X-Ray trace header. With Lambda active tracing off, that can drop every span.always_onrecords every invocation. For a fixed share instead, setOTEL_TRACES_SAMPLER=traceidratioandOTEL_TRACES_SAMPLER_ARGto a value such as0.25.OTEL_AWS_APPLICATION_SIGNALS_ENABLED=false— turns off the CloudWatch Application Signals processing, which adds overhead and AWS-specific attributes that Bronto doesn’t use. Lambda active tracing and the Application Signals IAM policy aren’t needed to export to Bronto.
OTEL_AWS_LAMBDA_FAST_START=true. That mode only sends traces to X-Ray, with no OTLP, metrics, or logs.
Step 3 — Set the runtime-specific settings
- Python
- Node.js
- Java
- .NET
- With Application Signals off, the layer no longer selects the ADOT distro and configurator by itself. Set them explicitly so the HTTP exporters bundled in the layer are used.
OTEL_PYTHON_LOGGING_AUTO_INSTRUMENTATION_ENABLED=truebridges Python’sloggingmodule to OpenTelemetry. The bridge sits on the root logger, so set the root logger level (for examplelogging.getLogger().setLevel(logging.INFO)) to the lowest level you want to export.- The layer sends exponential histograms by default, which Bronto doesn’t ingest.
explicit_bucket_histogramswitches to explicit histograms. - To keep cold starts short, the layer enables only the
botocoreandaws-lambdainstrumentations. SetOTEL_PYTHON_DISABLED_INSTRUMENTATIONS=noneto enable all of them, at a cold-start cost.
Resource Identity and Log Organization
The layer attaches OpenTelemetry resource attributes to every signal, includingcloud.* and faas.* attributes for the function. For logs only, Bronto maps service.name to a Dataset and service.namespace to a Collection. Metrics and traces use these attributes for identity and filtering, but are not stored in datasets or collections.
To override log routing, set headers on the logs exporter only with
OTEL_EXPORTER_OTLP_LOGS_HEADERS. It replaces OTEL_EXPORTER_OTLP_HEADERS for logs, so repeat the API key:
Cost Notes
- The ADOT Lambda Layer itself is free.
- Traces, metrics, and logs exported through the layer go straight to Bronto — no CloudWatch ingestion fees for those signals.
- Lambda’s automatic
stdout/stderrcapture writes to CloudWatch Logs by default. To stop paying for that, log through a bridged logging framework, or set the function’s log destination to Amazon Data Firehose; to keep both paths, add the CloudWatch Log Forwarder alongside the layer.
References
For assistance, contact support@bronto.io.
