Home / Companies / Honeycomb / Blog / Post Details
Content Deep Dive

Running the OpenTelemetry Collector as a Lambda

Blog post from Honeycomb

Post Details
Company
Date Published
Author
Jessica Kerr (Jessitron)
Word Count
2,603
Language
English
Hacker News Points
-
Summary

Deploying the OpenTelemetry Collector as an AWS Lambda function can be a viable solution for environments with infrequent telemetry needs, using a Lambda container image and Function URL to handle OTLP/HTTP requests. This setup is cost-effective for low traffic, with cold starts taking about 4 seconds and warm invocations 2–4 ms, but it is unsuitable for high-throughput scenarios due to Lambda's overhead and limitations on retry capabilities. The architecture involves packaging the collector with AWS Lambda Web Adapter to facilitate invocation handling, and it's essential to configure the system to be stateless per request, ensuring no batch processor or sending queue is enabled, as these can hold spans in memory and cause data loss during Lambda freezes. Authentication can be managed using bearer tokens to secure the publicly accessible Function URL, though AWS IAM authentication is not feasible due to the lack of Sigv4 support in OpenTelemetry SDKs. Deployment requires creating an ECR repository and a Lambda execution role, and verification involves checking proper request handling and data delivery to the backend, with troubleshooting focusing on common pitfalls like permission issues and configuration errors.