PromQL queries to Google Cloud Managed Service for Prometheus are partially evaluated at the Monarch backend by using Monitoring Query Language (MQL), and there are some known differences in query results. This document describes the differences.
New PromQL functions
Recently added PromQL functions might not be supported.
Matching on metric names
Only exact matching on metric names is supported.
Staleness
Staleness is not supported in the Monarch backend.
Calculation of irate
When the lookback window for the irate
function
is less than the step size, we increase the window to the step size.
MQL requires this change to ensure that none of the input data is
completely ignored in the output. This difference applies to
rate
calculations as well.
Calculation of rate
and increase
When the lookback window for the rate
function
is less than the step size, we increase the window to the step size.
MQL requires this change to ensure that none of the input data is
completely ignored in the output. This difference applies to
irate
calculations as well.
There are differences in the interpolation and extrapolation calculations. Monarch uses a different interpolation algorithm than Prometheus, and this difference can lead to slight different results. For example, Monarch counter samples are stored with a time range rather than the single timestamp that Prometheus uses. Therefore, counter samples in Monarch can be included in a rate calculation even though the Prometheus timestamp would exclude them.
Calculation of histogram_quantile
A PromQL histogram_quantile
calculation on a histogram with no samples
produces a NaN value. MQL's calculation produces no value; that
is, MQL drops the point at the timestamp instead.
The rate-calculation differences can also affect the input to
histogram_quantile
queries.