Prometheus · Arazzo Workflow
Prometheus Discover and Query a Metric
Version 1.0.0
Walk from "what metrics exist?" to an evaluated PromQL result.
Provider
Workflows
discover-and-query-metric
Discover a metric, inspect its metadata and labels, then evaluate it.
Uses the metadata endpoints to learn the shape of a metric before spending a query on it, which is the cheapest way to avoid writing a PromQL expression against a metric name or label that does not exist.
1
listMetricNames
getLabelValues
List every metric name in the TSDB by reading the values of the special __name__ label. This is how query UIs build metric autocomplete.
2
describeMetric
getMetricMetadata
Read the metric type (counter, gauge, histogram, summary) and help string scraped from the targets exposing this metric. The type decides whether rate(), increase(), or a bare selector is the correct query.
3
listLabelNames
getLabelNames
List the label names actually present on this metric, restricted by the series selector so the result is scoped to the metric under investigation.
4
resolveSeries
querySeries
Resolve the selector to the concrete label sets it matches. An empty result here means the selector matches nothing and any query built on it will return no data.
5
evaluateExpression
queryInstant
Evaluate the PromQL expression at a single point in time and return the resulting vector.