Modelplane Modelplane docs

MetricMapping Custom Resource

On this page

How one component’s metrics become part of the modelplane_* surface. Modelplane renders every MetricMapping into each inference cluster’s collector, so a mapping is written once on the control plane and reaches the whole fleet. A mapping naming a component Modelplane already provides renames for is additive: its renames run after the built-in ones, on whatever those left behind. A metric a built-in already renamed no longer answers to the name it was emitted under, so a second mapping selecting on that name matches nothing and the built-in stands. Select on the modelplane_ name instead to rename one of Modelplane’s own.

Concept guide: Monitor the Fleet →

#Metadata

API version
modelplane.ai/v1alpha1
Kind
MetricMapping
Scope
Cluster
Short names
mm

#Spec

How one component’s metrics become part of the modelplane_* surface. Modelplane renders every MetricMapping into each inference cluster’s collector, so a mapping is written once on the control plane and reaches the whole fleet. A mapping naming a component Modelplane already provides renames for is additive: its renames run after the built-in ones, on whatever those left behind. A metric a built-in already renamed no longer answers to the name it was emitted under, so a second mapping selecting on that name matches nothing and the built-in stands. Select on the modelplane_ name instead to rename one of Modelplane’s own.

# metrics required object[] 1–128 items
# from required string ≤ 255 chars

The metric’s name as the component exposes it, matched exactly wherever it appears in the fleet. A histogram is named by its base name, without the _count, _sum or _bucket a Prometheus query would use: the collector holds it as one metric, and part is what reaches into it.

pattern: ^[a-zA-Z_:][a-zA-Z0-9_:]*$

# fromUnit optional enum: Millijoules | Mebibytes | Milliseconds | Nanoseconds | Percent

What the component measures this in, when that isn’t the unit the name claims. Modelplane converts to the base unit: millijoules and milliseconds are divided by a thousand, nanoseconds by a billion, percent by a hundred, and mebibytes multiplied out to bytes. A histogram is converted whole - its sum, its bounds and its bucket boundaries - so its quantiles come out in the target unit too. Percent is for a component that counts a saturation from nought to a hundred where the name says a ratio. Check rather than assume: vLLM publishes kv_cache_usage_perc and the value is a fraction, so a name is no guide.

# labels optional object[] ≤ 16 items
# from optional string ≤ 63 chars

A label the component already emits. Modelplane copies its value into this label and removes the original. Naming the label itself keeps it: that is how values rewrites what a component writes without renaming the label.

pattern: ^[a-zA-Z_][a-zA-Z0-9_]*$

# name required string ≤ 63 chars

The label to set.

pattern: ^[a-zA-Z_][a-zA-Z0-9_]*$

# value optional string ≤ 253 chars

A fixed value, the same on every series this mapping produces. This is what tells two folded metrics apart.

# values optional map[string]string

What each of that label’s values becomes, for putting an engine’s own vocabulary into Modelplane’s. A value with no entry here is left as the component wrote it.

# part optional enum: Count | Sum

Take a part of a histogram as a counter of its own, rather than the histogram itself. Count is how many observations it holds, which is a request count where the histogram measures request duration. Sum is their total. The extraction leaves the histogram alone, but the collector exports only what a mapping renames, so the histogram itself is dropped unless another mapping gives it a modelplane_ name of its own. Write that second mapping to keep both.

# to required string ≤ 255 chars

The name to export the metric under. Only modelplane_* metrics leave a cluster, so a metric no mapping renames never leaves its cluster. Name it in base units - seconds, bytes, joules, a ratio from nought to one - because that is what fromUnit converts to.

pattern: ^modelplane_[a-z0-9_]*[a-z0-9]$

#Status

# clusters optional integer

How many inference clusters apply this mapping.

# conditions optional object[]