﻿# Prometheus query warnings: successful status can accompany incomplete results

A practical investigation of prometheus query warnings: successful status can accompany incomplete results, with explicit observations, control cases and evidence limits.

Author: Retrivium team
Updated: 2026-11-06
Canonical URL: https://retrivium.ai/journal/field-observe-query-api-warnings-coverage/
Language: en

## The diagnostic situation

A diagnostic exporter saves the data field from a successful Prometheus query and drops the rest of the response. A later report treats the resulting series as the complete selected workload. The API had returned a warning that some input elements were omitted. The numeric data remained usable in a limited scope, but the export erased the limitation needed to interpret it.

## Why the observation changes meaning

The Prometheus HTTP API response model permits data alongside warnings and informational annotations. Function semantics can explain omissions or special handling, including sample-type incompatibilities. These are distinct from a request-level error. A consumer that checks only transport status or status success cannot establish unqualified completeness, and a consumer that rejects every warning may discard useful qualified evidence unnecessarily.

## Define the instrumentation contract

Define a diagnostic result envelope containing the exact expression, evaluation bounds, endpoint, response status, data and annotations. Classify warning categories with version awareness without treating arbitrary text as a metric label. Record whether a warning affects population coverage, numerical interpretation or another property. Unknown annotations should remain available for review rather than being silently ignored or automatically declared fatal.

## A bounded verification procedure

Build client fixtures for complete success, success with warning, informational annotation and a request error. Use a controlled query that exercises documented sample handling where supported. Verify that the export preserves both values and qualification. Compare the later report with the full original response. Include an empty result with no warning to demonstrate that absence and acknowledged omission are not the same condition.

## Evidence required for acceptance

Acceptance evidence includes response fixtures, client parser version, stored envelope and report behavior. Show which results are accepted with limits and which are withheld under the declared policy. Confirm annotations survive serialization and translation into a human-readable report. A screenshot containing plausible data is insufficient if the exported artifact cannot explain the warning that accompanied the original result.

## Failure cases and limits

Warnings do not enumerate every missing source or prove a complete upstream population when absent. Collection failures, selectors and retention can create limitations outside the query response. This protocol validates preservation of API qualifications, not the correctness of every expression. It supports an honest evidence bundle while leaving the scope of returned data separate from the health of the inference service.

## Primary references and related reading

Retain query warnings and infos with data; status success is not a completeness certificate. [Prometheus HTTP query API](https://prometheus.io/docs/prometheus/latest/querying/api/); [PromQL function semantics](https://prometheus.io/docs/prometheus/latest/querying/functions/).

The proposed investigation of query api warnings coverage is not an executed deployment benchmark. Related reading: [Fleet p95: aggregate histograms rather than precomputed percentiles](/journal/provider-latency-histogram-aggregation/); [A metric disappeared from the graph: staleness, up and zero values](/journal/prometheus-scrape-staleness/).
