Node.js async handlers
Use a Lambda Node.js runtime that meets the SDK’s Node.js 22.15 minimum. Install the SDK and include it in your deployment package:withFlush so buffered telemetry is exported before the invocation returns:
index.handler. If you bundle the function, keep the SDK and instrumented dependencies external and include them in the deployment package. Do not also enable an auto-instrumentation Lambda layer for this setup.
Set the destination variables below in the Lambda function’s environment configuration. The endpoint must be reachable from your function. The SDK ends its flush before the invocation deadline; callback-based handlers are not supported by withFlush.
Configure your destination
- Fully managed
- Self-managed
Open Team Settings → Data → Managed Telemetry in your service and copy the OTLP HTTP endpoint and API key. Use the complete HTTPS endpoint, including its port:
Other runtimes and handlers
Follow the official Lambda auto-instrumentation instructions to select layers for your runtime, architecture, and AWS region and configure the instrumentation wrapper. Add and configure the OpenTelemetry Collector Lambda layer. Keep the application’s SDK exporters pointed at the local Collector, as described upstream. Configure the Collector’s outgoing connection below.Configure the Lambda Collector destination
SetCLICKHOUSE_OTLP_ENDPOINT and CLICKHOUSE_INGESTION_API_KEY in your Lambda function’s environment variables. Add the following exporter to your Collector configuration.
- Fully managed
- Self-managed
Open Team Settings → Data → Managed Telemetry in your service and copy the OTLP HTTP endpoint and API key. Set
CLICKHOUSE_OTLP_ENDPOINT to the complete HTTPS endpoint, including its port, and CLICKHOUSE_INGESTION_API_KEY to the key.otlphttp/clickhouse in the exporters list of each signal pipeline you want to send. For example, with the upstream otlp receiver:
OPENTELEMETRY_COLLECTOR_CONFIG_URI to its location, such as /var/task/collector.yaml, following the upstream Collector setup instructions.