333 lines
13 KiB
YAML
333 lines
13 KiB
YAML
# grom native dashboard config — Pilot metrics from Prometheus.
|
||
# Drift-watch layout: delivery headline → quality by model → pipeline latency
|
||
# → tokens/cost → guard counters. Every panel is verified against the live
|
||
# metric set (2026-07-16; headline cards re-verified 2026-08-05 against the
|
||
# pilot#4735 rolling-window gauges); comments note upstream data caveats.
|
||
# Run: grom run --config examples/pilot.yaml --prom http://localhost:9092
|
||
title: pilot
|
||
theme: pilot
|
||
refresh: 10s
|
||
range: 6h
|
||
|
||
widgets:
|
||
# Row 1 — headline stats with trend bands (24-col grid, four across).
|
||
- type: stat
|
||
title: delivery rate (30d)
|
||
unit: percentunit
|
||
sparkline: true
|
||
grid: { x: 0, y: 0, w: 6, h: 4 }
|
||
thresholds:
|
||
- color: red
|
||
- value: 0.5
|
||
color: yellow
|
||
- value: 0.8
|
||
color: green
|
||
queries:
|
||
# Rolling-window delivery: distinct issues shipped / attempted inside
|
||
# the daemon's stats window (default 30d), canary-excluded, deduped
|
||
# across retries (pilot#4735). Replaces pilot_issue_level_success_rate,
|
||
# which is lifetime and era-blends models — it reads ~0.799 forever
|
||
# while the honest last-30d figure is ~0.81 on a 5x costlier model mix.
|
||
# No {window=} matcher on purpose: the label value follows the daemon's
|
||
# stats_window_days knob. max() collapses label churn: when the window
|
||
# label changes (0d→30d after the pilot#4739 fix, or a knob change),
|
||
# the old label value lingers as a dead sibling series for the rest of
|
||
# the chart range — a bare selector returns both and the stat card can
|
||
# pick the dead one's 0. A hard 0 here means "daemon predates the
|
||
# pilot#4739 aggregate fix", not "nothing shipped".
|
||
- expr: max(pilot_window_delivery_rate)
|
||
|
||
- type: stat
|
||
title: cost / shipped (30d)
|
||
unit: currencyUSD
|
||
decimals: 2
|
||
sparkline: true
|
||
grid: { x: 6, y: 0, w: 6, h: 4 }
|
||
queries:
|
||
# Rolling-window cost per delivered issue (pilot#4735): window spend /
|
||
# distinct issues with a completed execution, server-computed from ONE
|
||
# canary-excluded population — replaces the lifetime sum/sum proxy,
|
||
# which era-blends models (read ~$0.80 while the honest last-30d figure
|
||
# is ~$3.66). Gauge refreshes on a 5-min daemon ticker, not per-scrape.
|
||
# 0 until the daemon carries the pilot#4739 aggregate fix. max()
|
||
# collapses window-label churn (see the delivery-rate card note).
|
||
- expr: max(pilot_window_cost_per_delivered_usd)
|
||
|
||
- type: stat
|
||
title: prs / 3h
|
||
unit: short
|
||
decimals: 0
|
||
sparkline: true
|
||
grid: { x: 12, y: 0, w: 6, h: 4 }
|
||
queries:
|
||
# Session throughput. max-min instead of increase(): the counter is
|
||
# store-hydrated at boot and the hydration base can land BELOW the
|
||
# pre-restart live value (merge-increment miss path) — Prometheus reads
|
||
# that dip as a counter reset and increase() adds the full ~1.2k base
|
||
# as "new PRs" (observed 1236 on the 2026-07-23 12:18Z restart).
|
||
# max-min never adds the base; worst case it undercounts across the
|
||
# restart boundary by the pre-restart window portion.
|
||
- expr: sum(max_over_time(pilot_prs_merged_total[3h]) - min_over_time(pilot_prs_merged_total[3h]))
|
||
|
||
- type: stat
|
||
title: time to ship (24h)
|
||
unit: s
|
||
decimals: 0
|
||
sparkline: true
|
||
grid: { x: 18, y: 0, w: 6, h: 4 }
|
||
thresholds:
|
||
- color: green
|
||
- value: 3600
|
||
color: yellow
|
||
- value: 10800
|
||
color: red
|
||
queries:
|
||
# Mean issue→PR latency over the trailing day (TASK-393 M1 histogram).
|
||
# Rising trend with a stable queue = executor drift, not load.
|
||
- expr: sum(increase(pilot_time_to_pr_seconds_sum[24h])) / (sum(increase(pilot_time_to_pr_seconds_count[24h])) > 0)
|
||
|
||
# Row 2 — quality & pipeline as a 2×2 block:
|
||
# ci pass rate | pipeline latency
|
||
# success by model | cost by model
|
||
- type: gauge
|
||
title: ci pass rate (30d)
|
||
unit: percentunit
|
||
min: 0
|
||
max: 1
|
||
grid: { x: 0, y: 4, w: 12, h: 7 }
|
||
thresholds:
|
||
- color: red
|
||
- value: 0.8
|
||
color: yellow
|
||
- value: 0.9
|
||
color: green
|
||
queries:
|
||
# pilot_ci_runs_total{result} shipped in pilot#4134. Windowed to 30d to
|
||
# match the delivery-rate card. Unlike delivery rate, Pilot exposes NO
|
||
# server-computed CI window gauge (the pilot_window_* family is
|
||
# delivery/attempt/cost only), so this is a client-side window using
|
||
# max_over_time - min_over_time, NOT increase(): pilot_ci_runs_total is
|
||
# store-hydrated and dips on restart (5 resets/30d, min never reaches 0),
|
||
# so increase() reads each hydration dip as a reset and re-adds the base,
|
||
# inflating the ratio (96.3% vs the honest 94.8%). max-min never adds the
|
||
# base; worst case it undercounts a restart-straddling window. See the
|
||
# prs/3h card note. For true parity with delivery rate, Pilot would need a
|
||
# pilot_window_ci_pass_rate gauge (dispatch, cf. pilot#4735).
|
||
- expr: sum(max_over_time(pilot_ci_runs_total{result="pass"}[30d]) - min_over_time(pilot_ci_runs_total{result="pass"}[30d])) / (sum(max_over_time(pilot_ci_runs_total[30d]) - min_over_time(pilot_ci_runs_total[30d])) > 0)
|
||
|
||
# Four same-unit series overlaid (first fills as area, later ones draw as
|
||
# lines). 1h windows: each point is the mean over events in that hour; gaps
|
||
# mean no activity in the stage. queue wait → time to pr → approval wait →
|
||
# time to merge is the full issue lifecycle; whichever line inflates names
|
||
# the drifting stage. Half-width here (was full-width) — the tradeoff for
|
||
# sitting beside the ci gauge; the legend header truncates sooner.
|
||
- type: timeseries
|
||
title: pipeline latency (1h p50)
|
||
unit: s
|
||
grid: { x: 12, y: 4, w: 12, h: 7 }
|
||
queries:
|
||
# Medians, not means: queue_wait carries multi-day outliers (observed
|
||
# 190h backfilled samples) that make a mean chart unreadable.
|
||
- expr: histogram_quantile(0.50, sum(rate(pilot_queue_wait_seconds_bucket[1h])) by (le))
|
||
legend: queue wait
|
||
- expr: histogram_quantile(0.50, sum(rate(pilot_time_to_pr_seconds_bucket[1h])) by (le))
|
||
legend: to pr
|
||
- expr: histogram_quantile(0.50, sum(rate(pilot_approval_wait_seconds_bucket[1h])) by (le))
|
||
legend: approval wait
|
||
- expr: histogram_quantile(0.50, sum(rate(pilot_pr_time_to_merge_seconds_bucket[1h])) by (le))
|
||
legend: to merge
|
||
|
||
- type: bargauge
|
||
title: success by model (30d)
|
||
unit: percentunit
|
||
grid: { x: 0, y: 11, w: 12, h: 7 }
|
||
queries:
|
||
# Per-attempt success share per model over the last 30d — the scoring
|
||
# drift view: a model whose bar sags after a version bump or prompt change
|
||
# is regressing. Windowed with max_over_time - min_over_time (NOT
|
||
# increase()): pilot_executions_total is store-hydrated and dips on
|
||
# restart, which increase() would misread as resets and re-add the base.
|
||
# The `> 20 execs` gate (also windowed) drops tiny-sample noise. NOTE:
|
||
# the fleet has effectively consolidated to one model in the last 30d, so
|
||
# this currently renders a single bar; more bars return automatically when
|
||
# other models run again in-window. sort_desc() ranks highest-first (grom
|
||
# renders instant-query series in Prometheus's returned order).
|
||
- expr: sort_desc(sum(max_over_time(pilot_executions_total{result="success"}[30d]) - min_over_time(pilot_executions_total{result="success"}[30d])) by (model) / (sum(max_over_time(pilot_executions_total[30d]) - min_over_time(pilot_executions_total[30d])) by (model) > 0) and on(model) (sum by (model)(max_over_time(pilot_executions_total[30d]) - min_over_time(pilot_executions_total[30d])) > 20))
|
||
legend: "{{model}}"
|
||
|
||
- type: bargauge
|
||
title: cost by model (30d)
|
||
unit: currencyUSD
|
||
grid: { x: 12, y: 11, w: 12, h: 7 }
|
||
queries:
|
||
# Per-model spend over the last 30d, windowed with max_over_time -
|
||
# min_over_time (pilot_execution_cost_usd_total is store-hydrated since
|
||
# pilot#4029; increase() would re-add the base on restart dips). Same
|
||
# windowed `> 20 execs` gate as "success by model" — currently one bar
|
||
# (single-model fleet in-window), repopulates when others run again.
|
||
- expr: sort_desc(sum(max_over_time(pilot_execution_cost_usd_total[30d]) - min_over_time(pilot_execution_cost_usd_total[30d])) by (model) and on(model) (sum by (model)(max_over_time(pilot_executions_total[30d]) - min_over_time(pilot_executions_total[30d])) > 20))
|
||
legend: "{{model}}"
|
||
|
||
# Row 3 — tokens: lifetime breakdown + burn rate.
|
||
- type: bargauge
|
||
title: tokens by direction
|
||
unit: short
|
||
grid: { x: 0, y: 18, w: 8, h: 8 }
|
||
queries:
|
||
- expr: sum(pilot_tokens_consumed_total) by (direction)
|
||
legend: "{{direction}}"
|
||
|
||
- type: timeseries
|
||
title: tokens / 5m
|
||
unit: short
|
||
stacked: true
|
||
grid: { x: 8, y: 18, w: 16, h: 8 }
|
||
queries:
|
||
# max-min per window (see prs/3h note: hydrated counter, increase()
|
||
# explodes across restarts). Two data caveats: (1) token counters
|
||
# increment at execution FINALIZE, not during streaming — mid-execution
|
||
# this legitimately reads 0 with executors busy; (2) the restart tick
|
||
# itself shows the hydration delta, read the neighbors not the spike.
|
||
- expr: sum(max_over_time(pilot_tokens_consumed_total[5m]) - min_over_time(pilot_tokens_consumed_total[5m])) by (direction)
|
||
legend: "{{direction}}"
|
||
|
||
# Row 4 — spend curve + outcome mix. Since pilot#4029 the cost counter is
|
||
# lifetime (store-hydrated), so the curve is true all-time spend.
|
||
- type: timeseries
|
||
title: cumulative cost
|
||
unit: currencyUSD
|
||
grid: { x: 0, y: 26, w: 12, h: 8 }
|
||
queries:
|
||
- expr: sum(pilot_execution_cost_usd_total)
|
||
legend: cost
|
||
|
||
- type: timeseries
|
||
title: execs by result / 1h
|
||
unit: short
|
||
stacked: true
|
||
grid: { x: 12, y: 26, w: 12, h: 8 }
|
||
queries:
|
||
# Outcome mix per hour — a failure/stall band widening while success
|
||
# holds flat is the earliest drift signal the executor emits.
|
||
# max-min: hydrated counter, increase() overcounts across restarts
|
||
# (see prs/3h note).
|
||
- expr: sum(max_over_time(pilot_executions_total[1h]) - min_over_time(pilot_executions_total[1h])) by (result)
|
||
legend: "{{result}}"
|
||
|
||
# Row 5 — right now: live pressure gauges. Process-scoped where noted.
|
||
- type: stat
|
||
title: queue
|
||
unit: short
|
||
decimals: 0
|
||
sparkline: true
|
||
grid: { x: 0, y: 34, w: 6, h: 4 }
|
||
thresholds:
|
||
- color: green
|
||
- value: 5
|
||
color: yellow
|
||
- value: 20
|
||
color: red
|
||
queries:
|
||
- expr: pilot_queue_depth
|
||
|
||
- type: stat
|
||
title: failed queue
|
||
unit: short
|
||
decimals: 0
|
||
sparkline: true
|
||
grid: { x: 6, y: 34, w: 6, h: 4 }
|
||
thresholds:
|
||
- color: green
|
||
- value: 1
|
||
color: red
|
||
queries:
|
||
# Tasks parked in failed state — anything nonzero is a wedged issue
|
||
# (the GH-4372 claim-blocked class shows up here first).
|
||
- expr: pilot_failed_queue_depth
|
||
|
||
- type: stat
|
||
title: active prs
|
||
unit: short
|
||
decimals: 0
|
||
sparkline: true
|
||
grid: { x: 12, y: 34, w: 6, h: 4 }
|
||
queries:
|
||
- expr: sum(pilot_active_prs)
|
||
|
||
- type: stat
|
||
title: api errors
|
||
unit: percentunit
|
||
sparkline: true
|
||
grid: { x: 18, y: 34, w: 6, h: 4 }
|
||
thresholds:
|
||
- color: green
|
||
- value: 0.05
|
||
color: yellow
|
||
- value: 0.2
|
||
color: red
|
||
queries:
|
||
- expr: pilot_api_error_rate
|
||
|
||
# Row 6 — guard counters (24h deltas): each one nonzero names a specific
|
||
# failure class. All should sit at 0 on a healthy day.
|
||
- type: stat
|
||
title: breaker trips 24h
|
||
unit: short
|
||
decimals: 0
|
||
sparkline: true
|
||
grid: { x: 0, y: 38, w: 6, h: 4 }
|
||
thresholds:
|
||
- color: green
|
||
- value: 1
|
||
color: yellow
|
||
- value: 3
|
||
color: red
|
||
queries:
|
||
# max-min fixes the previously documented overcount here (456 vs a
|
||
# lifetime total of 190): store-hydration re-bases this counter on
|
||
# restart and increase() read that as a reset. See prs/3h note.
|
||
- expr: sum(max_over_time(pilot_circuit_breaker_trips_total[24h]) - min_over_time(pilot_circuit_breaker_trips_total[24h]))
|
||
|
||
- type: stat
|
||
title: approval misses 24h
|
||
unit: short
|
||
decimals: 0
|
||
sparkline: true
|
||
grid: { x: 6, y: 38, w: 6, h: 4 }
|
||
thresholds:
|
||
- color: green
|
||
- value: 1
|
||
color: red
|
||
queries:
|
||
# Approval decisions that failed to persist (GH-4159 family) — the
|
||
# "PR sat in awaiting_approval forever" precursor.
|
||
- expr: sum(increase(pilot_approval_persist_misses_total[24h]))
|
||
|
||
- type: stat
|
||
title: approval submit fails 24h
|
||
unit: short
|
||
decimals: 0
|
||
sparkline: true
|
||
grid: { x: 12, y: 38, w: 6, h: 4 }
|
||
thresholds:
|
||
- color: green
|
||
- value: 1
|
||
color: red
|
||
queries:
|
||
# pilot_approval_submit_failures_total shipped in pilot#4386
|
||
# (2026-07-16, the undeliverable-approval-request fix). Renders "no
|
||
# data" until the daemon restarts onto that build — expected.
|
||
- expr: sum(increase(pilot_approval_submit_failures_total[24h]))
|
||
|
||
- type: stat
|
||
title: execs (this run)
|
||
unit: short
|
||
decimals: 0
|
||
sparkline: true
|
||
grid: { x: 18, y: 38, w: 6, h: 4 }
|
||
queries:
|
||
# Deliberately session-scoped: this histogram count is NOT
|
||
# store-hydrated, so it resets on every daemon restart — the
|
||
# sparkline sawtooth marks each restart.
|
||
- expr: sum(pilot_execution_duration_seconds_count)
|