TECHNOLOGY

Native histogram migration: mixed sample types can remove a PromQL rate result

In this article
THE QUICK TAKE

A rate range mixing float and native histogram samples can be omitted with a warning, even while source data exists.

The diagnostic situation

An instrumentation rollout changes a serving metric from float samples to native histogram samples under a queried identity. Immediately afterward a rate panel has a gap. Scraping is healthy and raw data is present. The query range straddles the type transition, so diagnosing the gap as a missing exporter or a model outage sends the investigation to the wrong boundary.

Why the observation changes meaning

Prometheus documents that rate omits a range-vector element containing both float and native histogram samples, with a warning annotation. Other functions have their own sample-type behavior. The observation is therefore a query compatibility issue tied to the chosen window, not necessarily data loss. A successful API response can still contain warnings explaining why particular results were removed.

Define the instrumentation contract

Record sample representation and migration time alongside metric identity and queries. Decide how old and new populations are compared without assuming the same function handles both identically. Preserve warning annotations in diagnostic exports. Do not fill the gap with zero traffic or perfect latency: neither value is established by a result omitted because its input types are incompatible.

A bounded verification procedure

Prepare synthetic float-only, native-histogram-only and mixed ranges under the relevant expression. Compare raw input membership, returned results and warnings. Shift the query window across the transition while keeping source data fixed. Include a genuinely missing source series as a separate control. The test should distinguish representation incompatibility from absent collection and from an ordinary reset within a valid counter type.

Evidence required for acceptance

Acceptance evidence includes producer version, sample types, transition timestamp, query range and the complete API response. Show which intervals support comparison and which cross the incompatible transition. Verify that dashboard and alert clients surface or retain the warning rather than silently showing a blank or green state. A recovered panel after the old samples leave the window does not prove the model recovered then.

Failure cases and limits

This does not mean every classic-to-native histogram migration produces one mixed series; naming and representation mappings determine the actual path. Inspect stored data before applying the explanation. The protocol validates query behavior for a concrete type transition. It does not recover discarded results automatically, establish equivalent bucket resolution or prove unchanged latency across an instrumentation rollout.

A rate range mixing float and native histogram samples can be omitted with a warning, even while source data exists. PromQL function semantics; Prometheus HTTP query API.

The proposed investigation of float native histogram mixed range is not an executed deployment benchmark. Related reading: Fleet p95: aggregate histograms rather than precomputed percentiles; OpenTelemetry GenAI: pin the semantic-convention version.

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