Repository navigation
Description
🚀 The feature, motivation and pitch
In OpenEngine gRPC mode (trtllm-serve --grpc --grpc-protocol openengine), TensorRT-LLM serves no Prometheus metrics. The HTTP server's metrics, including /prometheus/metrics and the /metrics iteration statistics, are not available. Please serve the same Prometheus families beside the gRPC server, and advertise their address so a sidecar or scraper can find them.
Current behavior on main (79d1d92):
- In
commands/serve.py,--grpcreplaceslaunch_serverwithlaunch_grpc_server. No HTTP listener starts. grpc/openengine/server.pyregisters only theInferenceandControlservices.- In HTTP mode,
serve/openai_server.pymounts/prometheus/metrics(withreturn_perf_metrics) and serves iteration stats at/metrics. These are thetrtllm_*families: KV-cache utilization and hit rate, host-cache utilization, offload/onboard bytes, and iteration statistics. --openengine-enable-load-metrics([None][feat] Stream native KV events and expose routing load #19440) exposes per-rank KV occupancy throughControl.GetLoad, for routing. It does not provide the Prometheus families or iteration statistics.
Why it matters: Dynamo's sidecar mode runs TensorRT-LLM in OpenEngine gRPC mode, with the Dynamo runtime in a separate process. The in-process python -m dynamo.trtllm worker publishes engine iteration and KV-cache metrics with --publish-metrics. A sidecar deployment has no equivalent source, so monitoring and benchmark harnesses record no engine KV-cache or iteration metrics for TensorRT-LLM in this mode. Dynamo's sidecar observability proposal (ai-dynamo/dynamo#16468) records this as a TensorRT-LLM upstream dependency: "serve /prometheus/metrics beside the OpenEngine gRPC server and advertise the address ... Then wire the TensorRT-LLM sidecar."
Proposed:
- An optional HTTP metrics listener in gRPC mode, for example
--metrics-host/--metrics-port, serving the same Prometheus families as HTTP mode under the same enablement (return_perf_metrics,enable_iter_perf_stats). - Advertise the metrics address in
GetServerInfo(for example inServerInfo.extra, until a portable field exists), so a co-located sidecar can re-export the families or a scraper can discover them.
Alternatives
- Add OpenEngine RPCs that return iteration and KV-cache statistics, including host offload, and have each sidecar re-encode them as Prometheus. This duplicates the existing Prometheus families in another schema.
- Keep HTTP mode for deployments that need engine metrics. This rules out Dynamo's sidecar mode for TensorRT-LLM.
Additional context
- Related: OpenEngine gRPC RFC [RFC]: Add openengine gRPC server support to trtllm-serve #17016.
- Observed with
nvcr.io/nvidia/tensorrt-llm/release:1.4.0a1.dev202610231815and Dynamo1.6.0.dev20261016(python -m dynamo.trtllm.sidecar): each worker's metrics endpoint was unreachable, and notrtllm_*series were collected. The same benchmark with the in-processdynamo.trtllm --publish-metricsworker recorded GPU KV-cache usage and hit rate.
Before submitting a new issue...
- Make sure you already searched for relevant issues, and checked the documentation and examples for answers to frequently asked questions.
Activity
[#21032][feat] Expose OpenEngine Prometheus metrics (#21034)