Files
ottyl/tickets/013-dashboards-promql.md
T
2026-09-05 12:46:45 +01:00

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) against Bucket data (003).
  • 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.

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