# 013 — Dashboards: PromQL query support ## Summary Support PromQL-style queries over declared metrics to derive dashboard visualizations, per the README's Dashboards section ("There should be support for promql queries to derive the visualisation"). ## Scope - Evaluate a useful PromQL subset (instant/range vector selection by metric name + label matchers, at minimum; consider `rate()`/`sum()`/`avg()` aggregations as stretch) against `Bucket` data ([003](003-metric-bucket-derivation.md)). - Decide whether to hand-roll the subset or bring in an existing PromQL parser crate — document the choice. - New `EngineQuery` variant for PromQL evaluation, following the existing single-owner-evaluates-in-place pattern. - API endpoint (e.g. `GET /api/query?promql=...`) returning a chart-ready series format (labels + time-value pairs), shaped for bar/line/pie consumption by [014](014-dashboards-ui.md). ## Acceptance criteria - A basic instant/range query against a declared metric with a label matcher returns correct series data against a seeded fixture. - Malformed PromQL returns a 4xx with a useful error. ## Depends on - [004 — Metrics API](004-metrics-api.md)