inference/research
verifiedhigh · 0.94updated 2026-10-04

TensorRT-LLM KV-cache-config info gauge

tensorrt-llm · gauge

Fields

id
metric-exposures/w3m-tensorrt-llm-trtllm-kv-cache-config-info
Metric name
trtllm_kv_cache_config_info
Metric type
gauge
Unit
1
Exposure
prometheus
Endpoint
:8000/prometheus/metrics
Labels
model_nameengine_type
Enabled by default
no
notes
TensorRT-LLM main, MetricsCollector in tensorrt_llm/metrics/collector.py, read 2026-10-04. collector.py line 32 carries the header comment 'Adapted from https://github.com/vllm-project/vllm/blob/v0.10.0rc1/vllm/engine/metrics.py#L30', so this is a vLLM fork with the prefix swapped to trtllm_. NOT ON BY DEFAULT: the collector is only constructed and /prometheus/metrics only mounted when --return_perf-metrics is set (llm_args default False). Endpoint is :8000/prometheus/metrics - NOT /metrics, and the server's own GET /metrics serves a JSON iteration-stats snapshot, so a scraper pointed at /metrics gets JSON rather than exposition text. Labels are model_name and engine_type. An info-style gauge set to 1 whose labels are the config keys themselves, logged once at startup. Because the label set is whatever the config dict contains, its cardinality is a function of the deployment - scrape it as a join key, not as a time series.

Notes

TensorRT-LLM main, MetricsCollector in tensorrt_llm/metrics/collector.py, read 2026-10-04. collector.py line 32 carries the header comment 'Adapted from https://github.com/vllm-project/vllm/blob/v0.10.0rc1/vllm/engine/metrics.py#L30', so this is a vLLM fork with the prefix swapped to trtllm_. NOT ON BY DEFAULT: the collector is only constructed and /prometheus/metrics only mounted when --return_perf-metrics is set (llm_args default False). Endpoint is :8000/prometheus/metrics - NOT /metrics, and the server's own GET /metrics serves a JSON iteration-stats snapshot, so a scraper pointed at /metrics gets JSON rather than exposition text. Labels are model_name and engine_type. An info-style gauge set to 1 whose labels are the config keys themselves, logged once at startup. Because the label set is whatever the config dict contains, its cardinality is a function of the deployment - scrape it as a join key, not as a time series.

Cross-references