
NVIDIA Dynamo is an open-source inference framework for deploying large-scale generative AI models across multi-node, multi-GPU environments. Distributed inference systems require comprehensive observability to track request flows, monitor resource utilization, and troubleshoot failures across multiple workers. Dynamo provides built-in observability through metrics (Prometheus), distributed tracing (OpenTelemetry/Tempo), and structured logging.
This guide covers enabling and configuring observability in NVIDIA Dynamo inference pipelines for both aggregated serving (single-worker) and disaggregated serving (separate prefill/decode workers), providing visibility into request latency, token throughput, KV cache performance, and system health.
Before you begin, ensure you:
Observability in NVIDIA Dynamo provides comprehensive monitoring capabilities through three interconnected systems that work together to provide visibility into inference pipeline performance and behavior.
Metrics expose quantitative measurements through Prometheus endpoints on each Dynamo component. The frontend service exposes metrics including request counts, token processing rates, time-to-first-token (TTFT), and inter-token latency on port 8000. Backend workers expose component-level metrics including request duration, inflight requests, and KV cache statistics on their system status ports (default: 8081). The metrics system uses the Prometheus exposition format and includes labels (dynamo_namespace, dynamo_component, dynamo_endpoint) to identify metric sources. All Dynamo-generated metrics use the dynamo_* prefix for consistent identification.
Tracing provides distributed request flow visualization using OpenTelemetry and Tempo. When enabled, Dynamo creates trace spans that follow requests across the frontend, prefill workers, and decode workers. Each trace includes a root http-request span from the frontend, a prefill_routing span for routing decisions, and handle_payload spans for prefill and decode operations. Traces use OpenTelemetry Protocol (OTLP) to export data to Tempo, where Grafana displays flame graphs showing request timelines, component interactions, and processing durations. Traces include correlation IDs through the x-request-id header, enabling request tracking across distributed components.
Logging captures structured event data in JSONL format with trace context. When JSONL logging is enabled, each log entry includes trace_id, span_id, and x_request_id fields that correlate logs with traces. The logging system supports configurable verbosity levels (ERROR, WARN, INFO, DEBUG, TRACE) and target-specific filtering. Logs are written to stderr and can be collected by log aggregation systems for centralized analysis.
NVIDIA Dynamo provides deployment scripts, container utilities, and orchestration modules required to run inference workloads. Clone the repository to access the deployment assets and container runtime scripts.
Clone the repository.
Navigate to the repository directory.
Switch to the latest stable release.
The command checks out the stable release. Visit the Dynamo releases page to find the latest stable release version.
Dynamo's observability architecture requires both infrastructure components (etcd, NATS) and monitoring services (Prometheus, Grafana, Tempo, exporters). The infrastructure services provide service discovery and message passing, while the observability services collect metrics, store traces, and visualize data. The Docker Compose configurations launch all required services with appropriate port mappings and network connectivity.
Start the infrastructure services.
Start the observability stack.
Verify all services are running.
All containers should be up and running with exposed ports for etcd, NATS, Grafana, Prometheus, Tempo, DCGM Exporter, and NATS Exporter.
The services expose monitoring interfaces on the following ports:
http://SERVER-IP:3000 (username: dynamo, password: dynamo)http://SERVER-IP:9090http://SERVER-IP:3200http://localhost:9401/metrics (GPU metrics)http://localhost:7777/metrics (NATS messaging metrics)Prometheus (running in Docker) scrapes metrics from worker endpoints running on the host machine. If a firewall is enabled, allow the worker and frontend ports for successful metrics collection.
Allow metrics ports through the firewall.
Verify the firewall rules.
The output displays the active firewall rules with allowed ports.
The vLLM container requires a CUDA version match between the host driver and container runtime to prevent GPU kernel incompatibilities. The NVIDIA Container Toolkit maps host GPUs into containers, requiring the container's CUDA version to align with the host driver's supported version.
Check the installed CUDA version.
The output displays the CUDA version in the top-right corner of the table:
Pull the vLLM container image from NGC. Match the CUDA version in the image tag to your system's CUDA version.
For CUDA 13.x, use:
For CUDA 12.x, use:
Visit the NVIDIA NGC Catalog to view all available image tags and CUDA versions.
This guide uses vLLM for examples, but observability features work with all supported backends (vLLM, SGLang, TensorRT-LLM). You can use observability settings with any backend by following the same configuration pattern. For backend-specific deployment steps, refer to How to Deploy Inference Using NVIDIA Dynamo and vLLM, How to Deploy Inference Using NVIDIA Dynamo and SGLang, and How to Deploy Inference Using NVIDIA Dynamo and TensorRT-LLM.
The container runs as UID 1000 and requires write access to the Hugging Face cache directory for model downloads. Incorrect permissions prevent the container from accessing cached model weights, causing worker initialization failures.
Create the cache directory if it does not exist.
Set ownership to the container user (UID 1000).
Set appropriate permissions.
NVIDIA Dynamo uses environment variables to control observability features across metrics, tracing, and logging systems. The following table describes the key environment variables for observability configuration.
Environment Variable Descriptions:
The container environment setup and observability configuration are common to both aggregated and disaggregated deployments. Complete these steps once before deploying either configuration.
Export your Hugging Face token to avoid rate limitations when downloading large models. Replace YOUR_HF_TOKEN with your actual token.
Run the vLLM container with GPU access and workspace mounting. Use the image tag that matches your CUDA version from the previous section.
The command starts an interactive container session with GPU support and passes the Hugging Face token to the container.
Inside the container, create an observability environment configuration file.
This environment file contains the observability configuration that will be sourced by both aggregated and disaggregated deployment scripts.
Aggregated serving runs both prefill and decode operations on a single worker, simplifying deployment while maintaining full observability capabilities. This configuration suits single-GPU setups or development environments.
Create a launch script for aggregated serving with observability enabled.
The script configures the following observability components:
observability.env to enable JSON logging (DYN_LOGGING_JSONL=true) and OpenTelemetry trace export (OTEL_EXPORT_ENABLED=true).OTEL_SERVICE_NAME for the frontend (dynamo-frontend) and worker (dynamo-worker-aggregated) to identify components in traces.DYN_HTTP_PORT) and port 8081 (worker via DYN_SYSTEM_PORT).--otlp-traces-endpoint to send trace spans to Tempo at http://localhost:4317.PYTHONHASHSEED=0 to ensure consistent KV event ID generation across requests for trace correlation.Make the script executable.
Run the deployment script.
The output displays initialization messages and endpoint URLs:
Open a new terminal session on your server (outside the container).
Test with a chat completion request.
The output displays the model's chat response in JSON format.
Verification confirms that metrics, tracing, and logging systems are functioning correctly by checking endpoints and generating test requests.
Verify metrics are exposed. Open a new terminal session.
The output displays the frontend request counter metric:
Verify worker metrics are exposed.
The output displays the worker uptime metric:
Send a test inference request with a custom request ID for trace correlation.
The output returns the generated response.
Check updated metrics after the request.
The counter increments to reflect the processed request.
Access Grafana to view the trace. Open http://SERVER-IP:3000 in a web browser and login with username dynamo and password dynamo.
Navigate to Explore (compass icon in the left sidebar).
Select Tempo as the data source (should be selected by default).
In the query type selector, choose Search.
Use the Search tab to find traces by configuring the following options:
dynamo-frontend, dynamo-worker-aggregated)http-request, handle_payload)x_request_id with value test-aggregated-001Click Run query to execute the search.
Click on the displayed trace to view the detailed flame graph showing the request flow through the frontend and worker components, including timing information for each span.
Navigate to Dashboards.
Click on Dynamo Dashboard to open the main metrics dashboard.
The Dynamo Dashboard displays real-time metrics including:
Use the time range selector in the top-right corner to adjust the viewing window (Last 5 minutes, Last 15 minutes, etc.).
Disaggregated serving separates prefill and decode operations across different workers, enabling independent scaling and optimization of each phase. This configuration requires multiple GPUs and provides detailed observability into each pipeline stage.
Create the disaggregated deployment script.
The script configures disaggregated observability with the following components:
OTEL_SERVICE_NAME identifiers (dynamo-worker-decode-1, dynamo-worker-decode-2, dynamo-worker-prefill-1, dynamo-worker-prefill-2) for trace differentiation.CUDA_VISIBLE_DEVICES (decode workers on GPUs 0-1, prefill workers on GPUs 2-3).DYN_SYSTEM_PORT=8081-8084) to enable per-worker monitoring.--otlp-traces-endpoint to send trace spans to Tempo, enabling end-to-end request flow visualization across prefill and decode stages.--kv-events-config with ZMQ endpoints (ports 20082-20083) for router optimization.VLLM_NIXL_SIDE_CHANNEL_PORT) for inter-worker KV cache transfer between prefill and decode workers.Make the script executable.
Run the deployment script.
The output displays initialization messages and endpoint URLs for all components:
Verification confirms that all workers expose metrics independently and traces capture the full request flow across prefill and decode stages.
Verify all worker metrics endpoints are accessible. Open a new terminal session.
The output displays metrics from each worker.
Send a test inference request with a custom request ID.
The output returns the generated response after processing through separate prefill and decode workers.
Check KV computed tokens statistics from a prefill worker.
The output displays KV cache metrics including active blocks, total blocks, and cache usage percentage:
Access Grafana at http://SERVER-IP:3000 and navigate to Explore.
Select Tempo as the data source.
In the query type selector, choose Search.
Use the Search tab to find traces by configuring the following options:
dynamo-frontend, dynamo-worker-prefill-1, dynamo-worker-decode-1)http-request, prefill_routing, handle_payload)x_request_id with value test-disaggregated-001Click Run query to execute the search.
Click on the displayed trace to view the detailed flame graph. Verify the trace includes separate spans for:
The span hierarchy displays the request flow from the frontend through prefill to decode operations with timing information for each pipeline stage.
Navigate to Dashboards (four squares icon in the left sidebar).
Click on Dynamo Dashboard to open the main metrics dashboard.
The Dynamo Dashboard displays real-time metrics from all workers including:
Use the time range selector in the top-right corner to adjust the viewing window and observe metrics from different workers.
You have successfully configured and deployed observability features in NVIDIA Dynamo inference pipelines for both aggregated and disaggregated serving modes. The deployment exposes comprehensive metrics through Prometheus, distributed traces through Tempo, and structured logs with trace correlation. The environment variables (DYN_LOGGING_JSONL, OTEL_EXPORT_ENABLED, OTEL_EXPORTER_OTLP_TRACES_ENDPOINT, OTEL_SERVICE_NAME, DYN_SYSTEM_PORT) control observability behavior across all Dynamo components, enabling consistent monitoring and troubleshooting capabilities. For more information about advanced observability configurations, refer to the official NVIDIA Dynamo observability documentation.
0 Comments
Be the first to comment and share your perspective with the community.