You only need to add the Node.js Lambda layer — no separate collector layer is required. Trace0 handles ingestion directly.
1. Add the OpenTelemetry Lambda Layer
Find the latestlayer-nodejs ARN for your AWS region from the opentelemetry-lambda releases page. Add the layer ARN to your function.
2. Set Environment Variables
3. Set HTTP request spans
For lambdas triggered via API Gateway, the HTTP request and response attributes are not set automatically on the lambda invocation span by the OTel Lambda auto-instrumentation. Therefore, they need to be set manually in your lambda code handler.4. Add Trace0 logger
To correlate logs with traces in Trace0, the @trace0/lambda-otel-logger library must be installed in your Lambda function. This is necessary because the OpenTelemetry JavaScript library does not yet automatically bridge console output into the OTel Logs pipeline. First, install the library:flush() at the end of every invocation: