promql-parser plus an
Arrow/DataFusion evaluator). Both instant and range queries are supported — a range query
steps through [start, end] and returns a matrix. This page is the authoritative support matrix.
Supported
Range-vector functions (metric[range])
rate, irate, increase, delta, idelta, deriv, predict_linear, resets, changes,
holt_winters (alias double_exponential_smoothing), and the full *_over_time family:
avg_over_time / min_over_time / max_over_time / sum_over_time / count_over_time /
quantile_over_time / stddev_over_time / stdvar_over_time / last_over_time /
present_over_time / mad_over_time.
Aggregations (with by() / without())
sum, avg, min, max, count, stddev, stdvar, quantile, group, count_values,
topk, bottomk, limitk, limit_ratio.
Histograms
histogram_quantile(q, sum by(le)(rate(metric_bucket[range]))) — linear interpolation over classic
le buckets.
histogram_fraction(lower, upper, v) — over classic le buckets, estimates the fraction of
observations that fall within [lower, upper] (same piecewise-linear CDF,
(rank(upper) - rank(lower)) / total).
Labels & sorting
label_replace, label_join, sort, sort_desc, sort_by_label, sort_by_label_desc.
Time
time, timestamp, minute, hour, day_of_week, day_of_month, day_of_year,
days_in_month, month, year (UTC; the date functions default to vector(time())).
Type / absence
vector, scalar, absent, absent_over_time.
Math / rounding / trig
abs, ceil, floor, round, exp, ln, log2, log10, sqrt, sgn,
clamp / clamp_min / clamp_max, sin / cos / tan / asin / acos / atan / sinh /
cosh / tanh / asinh / acosh / atanh, pi, deg, rad.
Operators
Arithmetic+ - * / % ^, comparison == != > < >= <= (with bool), the set operators
and / or / unless, vector matching on(...) / ignoring(...) with
group_left / group_right, and unary negation.
Modifiers & structure
Selector@ (start() / end() / <ts>) and offset (including on matrix selectors);
subqueries inner[range:step].
Not implemented / known differences
Unsupported functions and syntax return the error
promql function not yet supported: <name>,
which POST /api/v1/query (language: "promql") maps to 400.
An alert rule evaluates a PromQL expression when its
query.language is promql, as an instant query at
the end of the evaluation window. The rule itself is a MoleSignal AlertRule, which is not
interoperable with the Prometheus rule format. See Create a rule.Label matching
=, !=, =~, !~ (regex via RE2 — slightly different from Prometheus PCRE). __name__ matches
the metric_name column, and a quoted name selects a metric whose name has dots, as in
{"http.server.duration"}. A selector without a metric name, such as {job="api"} or
{__name__=~"http_.*"}, reads every metric its matchers accept, and its series keep __name__.
Metric stream layout
A metrics stream holds the metrics of one source, such as one Prometheus server, and keeps labels as separate columns instead of a JSON blob:metric_name and then time. A selector reads the
streams that hold its metric, and from their Parquet files whose time range overlaps the query only the pages
that hold the metric. It builds one series per distinct label set and applies the matchers (=, !=, =~,
!~) in the engine. @ and offset shift the evaluation instant. For metrics that arrive over OTLP, see the OTLP metric fields.