TECHNOLOGY

Metric cardinality overflow: preserve totals while acknowledging lost routing detail

In this article
THE QUICK TAKE

Overflow aggregation can retain synchronous measurements while removing their original routing cohort labels.

The diagnostic situation

A new routing category is enabled and its named metric series never appears. Operators conclude that no traffic used the route. The configured OpenTelemetry cardinality limit may instead have directed measurements into an overflow aggregation. The overall work total can remain correct while the route-level breakdown becomes incomplete, so absence of a named series is not evidence of unused capacity.

Why the observation changes meaning

The metrics SDK specifies an overflow attribute set for measurements that cannot receive an independent aggregator. For synchronous instruments it requires each measurement to enter exactly one normal or overflow aggregator, without dropping or double counting due to overflow. That guarantee is scoped: asynchronous behavior and installed implementation support must be checked separately rather than inferred from a shared metric name.

Define the instrumentation contract

Define the routing label domain, effective cardinality limit and temporality. Include overflow in total-work queries, while keeping it visibly separate from named cohorts. Do not assign overflow to whichever route seems least busy. Preserve enough safe routing inventory to explain which categories may be missing, without adding unique request identities as metric dimensions and defeating the original limit.

A bounded verification procedure

Use a synchronous counter fixture with a known inventory of category increments. Establish ordinary categories, then introduce enough distinct synthetic categories to exercise the configured limit. Compare the sum of normal and overflow data with the original inventory. Repeat after a collection boundary under the selected temporality, because which attribute sets remain individually visible can depend on aggregation behavior.

Evidence required for acceptance

Acceptance evidence includes SDK version, instrument kind, View configuration, temporality and exported attribute sets. Show total conservation alongside the fraction or amount whose detailed cohort was lost. Verify dashboard filters so a query selecting only known route names does not silently omit overflow. Alert separately on degraded breakdown quality rather than reporting every missing named route as an application incident.

Failure cases and limits

An accurate aggregate does not recover the distribution hidden inside overflow. A route-specific SLO may therefore be unevaluable even when total accounting reconciles. Raising the limit changes memory and export costs, while shortening labels does not necessarily reduce distinct combinations. This protocol checks bounded aggregation semantics; it does not guarantee complete tenant attribution or validate arbitrary backend handling of the overflow marker.

Overflow aggregation can retain synchronous measurements while removing their original routing cohort labels. OpenTelemetry metrics SDK; OpenTelemetry metrics data model.

The proposed investigation of metric cardinality overflow cohort is not an executed deployment benchmark. Related reading: Provider metric cardinality: request IDs do not belong in labels; Fleet p95: aggregate histograms rather than precomputed percentiles.

Earn rental income from GPUs

Have idle GPUs or looking to fund AI infrastructure? Retrivium finds a rental platform, sets up the server and helps you assess income and costs with a pilot.

Explore GPU hosting
← All articles