Skip to content

[Feature]: Serve Prometheus metrics in OpenEngine gRPC mode and advertise the address #21032

Open

Description

@zhongdaor-nv

🚀 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, --grpc replaces launch_server with launch_grpc_server. No HTTP listener starts.
  • grpc/openengine/server.py registers only the Inference and Control services.
  • In HTTP mode, serve/openai_server.py mounts /prometheus/metrics (with return_perf_metrics) and serves iteration stats at /metrics. These are the trtllm_* 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 through Control.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:

  1. 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).
  2. Advertise the metrics address in GetServerInfo (for example in ServerInfo.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.dev202610231815 and Dynamo 1.6.0.dev20261016 (python -m dynamo.trtllm.sidecar): each worker's metrics endpoint was unreachable, and no trtllm_* series were collected. The same benchmark with the in-process dynamo.trtllm --publish-metrics worker 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

  1. self-assigned this
    on Oct 26, 2026
  2. added a commit that references this issue on Oct 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions