Setting Up AWS Distro for OpenTelemetry with Container-Based Lambda Functions and New Relic
Briefly

Setting Up AWS Distro for OpenTelemetry with Container-Based Lambda Functions and New Relic
"Observability in serverless environments can be challenging, but AWS Distro for OpenTelemetry (ADOT) simplifies this by providing a standardized, vendor-neutral way to collect and export telemetry. ADOT allows you to leverage industry-standard OpenTelemetry APIs to instrument your applications without being locked into a single observability backend. The challenge with containerized Lambdas is that they do not support standard Lambda Layers. Since ADOT is typically deployed as a layer for Lambda functions, we need an alternative way to get the telemetry agent into our execution environment."
"This post walks through a practical workaround by embedding ADOT directly into your container image using a multi-stage Docker build, followed by exporting that telemetry to New Relic. Why Container Images? AWS Lambda supports two deployment types: ZIP packages (with Lambda Layers) and container images. Container images offer significant advantages: Larger deployment packages up to 10GB vs. 250MB for ZIP Consistent tooling with your existing CI/CD pipelines Full control over runtime dependencies and versions Pre-built dependencies that reduce cold start times for complex applications"
ADOT provides a standardized, vendor-neutral method to collect and export telemetry using OpenTelemetry APIs, enabling application instrumentation without vendor lock-in. Container images for AWS Lambda cannot use Lambda Layers because Layers are ZIP-deployment features extracted to /opt at runtime, and container images are self-contained filesystems where AWS cannot inject layer content. A practical workaround is to download and extract ADOT layer contents during a multi-stage Docker build, embedding the telemetry agent into the container image. Container images offer larger package sizes, consistent CI/CD tooling, full control over runtimes and pre-built dependencies that reduce cold starts. The build embeds ADOT and exports telemetry to New Relic.
Read at New Relic
Unable to calculate read time
[
|
]