Skip to content

Configuration & Data

Set these environment variables on the Lambda function, alongside the layer. For the full walkthrough, start with Setup.

VariableValue
OTEL_EXPORTER_OTLP_ENDPOINTYour KloudMate OTLP endpoint, for example https://otel.kloudmate.com:4318.
OTEL_EXPORTER_OTLP_HEADERSYour ingest key as an Authorization header: Authorization=YOUR_KLOUDMATE_API_KEY. Create a key under API Keys.
VariableValue
OTEL_SERVICE_NAMEThe name your function appears under in KloudMate. Defaults to the function name.
OTEL_LOGS_EXPORTERSet to none to stop sending logs — for example, when the AWS account integration already collects this function’s logs from CloudWatch.
OTEL_METRICS_EXPORTERSet to none to stop sending metrics.
OTEL_TRACES_EXPORTERSet to none to stop sending traces.
OTEL_LOG_LEVELSet to debug to print the extension’s own diagnostics to CloudWatch — useful when telemetry isn’t showing up.

The extension reports these for every invocation. Use the names to build dashboards and alerts in KloudMate.

MetricUnitWhat it measures
faas.invoke_durationsecondsTotal invocation time
faas.init_durationsecondsCold-start time (cold starts only)
faas.mem_usagebytesPeak memory used
aws.lambda.billed_durationsecondsAWS billed time
aws.lambda.produced_bytesbytesResponse payload size
aws.lambda.runtime_durationsecondsHandler time, not counting the extension
aws.lambda.restore_durationsecondsSnapStart restore duration

Each metric is tagged with the request ID, a cold-start flag, and the invocation status, so you can filter and group by any of them.

You can use these metrics to build dashboards that track your function’s health and resource consumption over time.

Lambda OTel Dashboard showing invocation trends, memory usage, billed duration, and cold start metrics

Your function’s stdout/stderr lines arrive as logs, with the severity read from each line. Without active tracing, you still get logs and metrics.

Every logs or print statement from your function code is forwarded directly to the Log Explorer, alongside lifecycle events like START, END, and REPORT requests.

Log Explorer displaying Lambda execution logs and lifecycle messages

With X-Ray active tracing enabled, each invocation also produces a trace. This connects the logs from that specific execution to a unified trace timeline.

In the Traces explorer, you can list and filter invocations by their duration and status:

Traces list showing recent execution spans and durations

Selecting an execution trace opens a detailed breakdown of the execution timeline. This breaks down the lifecycle into sub-spans like responseLatency, responseDuration, and runtimeOverhead:

Trace details showing sub-span latency and runtime overhead timeline