1.2 KiB
1.2 KiB
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) againstBucketdata (003). - Decide whether to hand-roll the subset or bring in an existing PromQL parser crate — document the choice.
- New
EngineQueryvariant 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.
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.