Environment Variables

Every environment variable that controls Dynamo metrics, tracing, logging, health checks, and request capture.
View as Markdown

This page catalogs the environment variables that govern Dynamo observability. Set them on every frontend, router, or worker that should emit a signal. For local procedures, see Observe a Local Deployment and Observe a Local Deployment.

The canonical list of variable names lives in lib/runtime/src/config/environment_names.rs, which groups them by area (logging, OTLP, system server, canary, request trace). The logging and OTLP variables are read in lib/runtime/src/logging.rs setup_logging(); the DYN_SYSTEM_* and health variables are read by the system-status server. The backend log-level variables (VLLM_LOGGING_LEVEL, TLLM_LOG_LEVEL) are read by the respective engines, not the Dynamo runtime.

Every variable on this page is set the same way whether you run locally or on Kubernetes — the same name, only the value or convention differs. A few fields note an Operator preset: the value the Dynamo operator injects on Kubernetes, which your own configuration overrides. Kubernetes-only metrics enablement is controlled by CRD annotations and Helm values rather than environment variables — see Operator Metrics.

Prometheus metric families in Dynamo are registered lazily: each label set is created the first time it fires, so a freshly-started process shows empty metric families until the first relevant request. An idle cluster does not mean scraping is broken.

Setting these variables

Every Dynamo process reads its own environment at startup, so set these on each process you want to emit signals — the frontend, the router, and each worker. The tabs below cover the two ways to do that; everything inside applies to whichever environment you pick.

Export the variables in the shell before launching each process, then start the frontend and one or more workers:

$export DYN_SYSTEM_PORT=8081
$export DYN_LOGGING_JSONL=true
$export DYN_LOG=info
$
$# Frontend (serves dynamo_frontend_* on DYN_HTTP_PORT, default 8000)
$python -m dynamo.frontend &
$
$# vLLM worker (serves dynamo_component_* on DYN_SYSTEM_PORT)
$python -m dynamo.vllm --model Qwen/Qwen3-0.6B &

Use python -m dynamo.sglang or python -m dynamo.trtllm for the other backends, and python -m dynamo.router for a standalone router.

System and metrics

DYN_SYSTEM_PORT
integerDefaults to -1 (disabled)

Port for the backend component’s system-status server, which serves /metrics and the health endpoints. Disabled by default; local examples use 8081. Must be set explicitly for backend workers and the standalone router to expose metrics.

Operator preset: 9090 on worker, prefill, decode, and planner pods.

DYN_HTTP_PORT
integerDefaults to 8000

Frontend HTTP port, where dynamo_frontend_* metrics are served at /metrics. Also configurable via the --http-port flag.

Operator preset: 8000 on frontend pods.

NIXL_TELEMETRY_ENABLE
stringDefaults to n

Enables NIXL telemetry. NIXL metrics track KV cache and embedding data transfers and are populated only during disaggregated serving or multimodal embedding transfers.

Allowed values: y n

Operator preset: n on worker, prefill, and decode pods.

NIXL_TELEMETRY_EXPORTER
string

NIXL telemetry exporter to use, e.g. prometheus.

Operator preset: prometheus on worker, prefill, and decode pods.

NIXL_TELEMETRY_PROMETHEUS_PORT
integerDefaults to 19090

Port for NIXL’s Prometheus exporter — a separate port from the Dynamo metrics port. Use distinct values per worker (e.g. 19090 prefill, 19091 decode) to avoid collisions.

Operator preset: 19090 on worker, prefill, and decode pods.

OpenTelemetry (traces and logs)

OTEL_EXPORT_ENABLED
booleanDefaults to false

Master switch for OTLP export. Gates both traces and runtime logs. Request trace records require the separate otel request-trace sink.

OTEL_EXPORTER_OTLP_ENDPOINT
string

Generic endpoint for traces and logs. For grpc, Dynamo uses it as-is. For http/protobuf, Dynamo appends /v1/traces or /v1/logs. When unset, each signal uses its protocol default.

OTEL_EXPORTER_OTLP_TRACES_ENDPOINT
string

Trace-only endpoint, used as-is. Falls back to OTEL_EXPORTER_OTLP_ENDPOINT, then http://localhost:4317 for grpc or http://localhost:4318/v1/traces for http/protobuf.

OTEL_EXPORTER_OTLP_LOGS_ENDPOINT
string

Log-only endpoint, used as-is. Falls back to OTEL_EXPORTER_OTLP_ENDPOINT, then http://localhost:4317 for grpc or http://localhost:4318/v1/logs for http/protobuf. It does not fall back to the traces endpoint.

OTEL_EXPORTER_OTLP_PROTOCOL
stringDefaults to grpc

Default OTLP transport for traces and logs.

Allowed values: grpc http/protobuf
OTEL_EXPORTER_OTLP_TRACES_PROTOCOL
string

Trace-only protocol override. Falls back to OTEL_EXPORTER_OTLP_PROTOCOL.

OTEL_EXPORTER_OTLP_LOGS_PROTOCOL
string

Log-only protocol override. Falls back to OTEL_EXPORTER_OTLP_PROTOCOL.

OTEL_TRACES_SAMPLE_RATIO
number

Head-sampling ratio in [0.0, 1.0]. Unset exports every trace. For example, 0.01 retains approximately one percent of traces.

OTEL_SERVICE_NAME
stringDefaults to dynamo

Service name attached to exported telemetry. Use a per-component value such as dynamo-frontend to distinguish services.

Logging

DYN_LOGGING_JSONL
booleanDefaults to false

Emit logs as JSONL. When enabled, logs include trace_id and span_id fields and spans are created per request. Recommended for Loki.

DYN_LOGGING_SPAN_EVENTS
booleanDefaults to false

Emit span entry/close events (SPAN_FIRST_ENTRY, SPAN_CLOSED messages).

DYN_LOG
stringDefaults to info

Log level, optionally per target: <default_level>,<module_path>=<level>,.... Example: info,dynamo_runtime::system_status_server:trace.

DYN_LOG_USE_LOCAL_TZ
booleanDefaults to false

Use the local timezone for log timestamps. Default is UTC.

DYN_LOGGING_CONFIG_PATH
string

Path to a custom TOML logging configuration. Unset by default.

VLLM_LOGGING_LEVEL
stringDefaults to INFO

vLLM backend log level. Completely independent of DYN_LOG.

Allowed values: DEBUG INFO WARNING ERROR CRITICAL
TLLM_LOG_LEVEL
stringDefaults to INFO

TensorRT-LLM backend log level. Independent of DYN_LOG and read once at import time — it must be set before the process starts.

Allowed values: TRACE DEBUG INFO WARNING ERROR INTERNAL_ERROR
DYN_SKIP_SGLANG_LOG_FORMATTING
booleanDefaults to false

Disable Dynamo’s SGLang log configuration so you can manage the SGLang engine’s logging independently (e.g. via the worker’s --log-level flag).

Health checks

DYN_HTTP_SVC_HEALTH_PATH
stringDefaults to /health

Path of the frontend health endpoint.

DYN_HTTP_SVC_LIVE_PATH
stringDefaults to /live

Path of the frontend liveness endpoint.

DYN_SYSTEM_STARTING_HEALTH_STATUS
stringDefaults to notready

Initial health status a component reports before its required endpoints are served.

Allowed values: ready notready
DYN_SYSTEM_HEALTH_PATH
stringDefaults to /health

Path of the health endpoint on the system-status server.

DYN_SYSTEM_LIVE_PATH
stringDefaults to /live

Path of the liveness endpoint on the system-status server.

DYN_SYSTEM_USE_ENDPOINT_HEALTH_STATUS
string

Deprecated compatibility variable. The current runtime logs a warning and does not use this value to select endpoints for system health.

Operator preset: ["generate"] on worker, prefill, and decode pods.

DYN_HEALTH_CHECK_ENABLED
booleanDefaults to false

Enables canary health checks, which actively probe worker endpoints during idle periods. Defaults to false. The shadow-engine failover path may re-enable it per engine. (The health-check guide describes canary checks as “automatically enabled” in Kubernetes — that reflects the intended failover behavior, not the base value the operator injects.)

Operator preset: false on worker, prefill, and decode pods.

DYN_CANARY_WAIT_TIME
integerDefaults to 10

Seconds of endpoint idle time before a canary health check is sent. Lower values check more frequently.

DYN_HEALTH_CHECK_REQUEST_TIMEOUT
integerDefaults to 3

Maximum seconds to wait for a canary health-check response before marking the endpoint unhealthy.

DYN_HEALTH_CHECK_PAYLOAD
string

Optional canary payload override for unified backends. Accepts a JSON object or @/path/to/payload.json and takes precedence over the backend’s default payload.

Forward Pass Metrics tracing

DYN_FPM_TRACE
boolean

Enables Forward Pass Metrics persistence. Equivalent to the worker --fpm-trace switch.

DYN_FPM_OUTPUT_PATH
stringDefaults to /tmp/dynamo-fpm

Output prefix for <prefix>.<producer-id>.<index>.jsonl.gz files.

DYN_FPM_MODE
stringDefaults to sampled

Capture mode: sampled writes the latest changed value per worker and data-parallel rank; full writes every valid payload.

DYN_FPM_SAMPLE_INTERVAL_MS
integerDefaults to 5000

Sampling interval used by sampled mode.

DYN_FPM_JSONL_GZ_ROLL_BYTES
integerDefaults to 268435456

Segment roll threshold in uncompressed JSONL bytes.

DYN_FPM_MAX_SEGMENTS
integerDefaults to 4

Number of segments retained independently for each producer.

See Forward Pass Metrics Trace Reference for topology support and file semantics.

Request tracing

DYN_REQUEST_TRACE
boolean

Master switch. When enabled without an explicit record selection, emits request_end,tool.

DYN_REQUEST_TRACE_RECORDS
stringDefaults to request_end,tool

Comma-separated record types: request_end, request_payload, and tool.

DYN_REQUEST_TRACE_SINKS
stringDefaults to file

Comma-separated sinks: file, stderr, nats, and otel.

DYN_REQUEST_TRACE_FILE_PATH
stringDefaults to /tmp/dynamo-request-trace

Literal JSONL path or gzip segment prefix, depending on DYN_REQUEST_TRACE_FILE_FORMAT.

DYN_REQUEST_TRACE_FILE_FORMAT
stringDefaults to jsonl_gz

File encoding: jsonl or rotating jsonl_gz.

DYN_REQUEST_TRACE_CAPACITY
integerDefaults to 1024

Best-effort in-process broadcast capacity.

DYN_REQUEST_TRACE_NATS_SUBJECT
stringDefaults to dynamo.request_trace.v1

Subject used by the nats sink.

DYN_REQUEST_TRACE_OTEL_MAX_PAYLOAD_BYTES
integerDefaults to 4194304

Maximum serialized OTLP payload attribute size. Oversized payload rows emit an incomplete marker.

DYN_REQUEST_TRACE_FILE_BUFFER_BYTES
integerDefaults to 1048576

File batching threshold in bytes.

DYN_REQUEST_TRACE_FILE_FLUSH_INTERVAL_MS
integerDefaults to 1000

Periodic file flush interval in milliseconds.

DYN_REQUEST_TRACE_FILE_ROLL_BYTES
integerDefaults to 268435456

Gzip roll threshold in uncompressed bytes.

DYN_REQUEST_TRACE_FILE_ROLL_LINES
integer

Optional gzip roll threshold in records.

DYN_REQUEST_TRACE_TOOL_EVENTS_ZMQ_ENDPOINT
string

Optional ZMQ PULL bind address for harness tool events. Configure it on only one process.

DYN_REQUEST_TRACE_TOOL_EVENTS_ZMQ_TOPIC
stringDefaults to agent-tool-events

First-frame ZMQ topic filter.

DYN_REQUEST_TRACE_HTTP_HEADER_CAPTURE_LIST
string

Comma- or whitespace-separated allowlist of HTTP header names captured on request_payload rows. Values are not redacted.

See Request Trace Reference for compatibility aliases, sink behavior, and record semantics.