Skip to content

fix(monitoring): tidy LLM stack windows, units and lines - #5052

Merged
dan-petty merged 3 commits into
mainfrom
fix/4732-llm-stack-windows
Nov 12, 2026
Merged

dan-petty merged 3 commits into
mainfrom
fix/4732-llm-stack-windows

Conversation

@dan-petty

Copy link
Copy Markdown
Owner

The LLM stack dashboard (llm-stack.json) gave wrong or noisy values.

  • Each time series rate uses $__rate_interval, so a short peak stays visible at a wide range.
  • No mean or rolling lines. Only calls, requests and power keep Total (Sum).
  • "GPU Memory Used" uses mbytes: DCGM gives MiB.
  • The request panels count only the chat and embeddings routes, as ai-spend.json does.
  • Cooldowns and fallbacks are stats of the time range that show "none recorded" with no series. A constant fallback stays refused.
  • Qdrant draws each status once, and shows the collection count apart from the vectors per collection.
  • The aggregate-lines requirement no longer names llm-stack.json.

Closes #4732

Change: openspec/changes/archive/2026-11-12-4732-tidy-llm-stack-windows-units-and/

The tests hold llm-stack.json to rates over $__rate_interval, no mean or rolling lines, the unit mbytes for GPU memory, the model routes only, stats of the cooldowns and fallbacks in the time range, and the Qdrant collections apart from the vectors. The aggregate-lines test no longer names llm-stack.json.
Each time series of llm-stack.json takes its rate over $__rate_interval. The breakdown panels lose the mean and rolling lines, and keep a total only for calls, requests and power. GPU Memory Used shows MiB. The request panels count only the chat and embeddings routes. The cooldown and fallback panels are stats of the time range. Qdrant draws each status once, and shows the collection count apart from the vectors per collection.
@dan-petty dan-petty added type/bug Type bug: the code does not do what it must scope/monitoring Grafana, Prometheus, Loki, alerts and dashboards labels Nov 12, 2026
@dan-petty

Copy link
Copy Markdown
Owner Author

Fail-to-pass (devops ci fail-to-pass --base origin/main): 6 failed on base, 122 passed (tests/grafana/test_grafana_dashboards.py, tests/commands/k8s/test_stack_dashboards.py; 0 errored). The 6 tests that fail on base and pass on head:

  • test_llm_stack_time_series_take_each_rate_over_the_rate_interval
  • test_llm_stack_breakdown_panels_add_a_total_only_to_requests_and_power
  • test_llm_stack_counts_only_the_model_routes
  • test_llm_stack_counts_cooldowns_and_fallbacks_in_the_time_range
  • test_llm_stack_qdrant_row_draws_each_value_once_on_its_own_scale
  • test_llm_stack_dashboard_includes_qdrant_row_over_captured_metrics

Local checks on head: uv run pytest tests/grafana tests/prometheus/test_k8s_monitoring_dashboards.py tests/commands/k8s/test_stack_dashboards.py tests/prometheus/test_dashboard_queries.py: 171 passed. devops openspec check, devops ci docs, ruff check and ruff format: pass.

Measurements

  • Routes in 24 h (Prometheus instant query, 2026-11-12): /v1/chat/completions 3937, /v1/embeddings 1012, /v1/systemone 205.
  • Fixed windows in time series targets of llm-stack.json: base 24 (17 [5m], 3 [2m], 3 [30m], 1 [30m:1m]); head 0. The issue counted 21 [5m] or [2m] targets; the census gives 20.

Deviation from the issue: the issue proposed or vector(0) on the cooldown and fallback stats. expression_violations in tests/commands/k8s/test_stack_dashboards.py refuses a constant fallback in this dashboard, and k8s/README.md gives the reason. The stats use noValue: "none recorded", as otel-collector.json does.

Live steps: none for an agent. Argo CD syncs the grafana-stack-dashboards ConfigMap from main after the merge, and the Grafana sidecar loads the new dashboard. To check: open "LLM Gateway & GPUs" and look at "GPU Memory Used" (MiB values), the two stats in the "Routing and Failover" row and the "Qdrant Collections" stat.

@dan-petty
dan-petty marked this pull request as ready for review November 12, 2026 12:26
@dan-petty
dan-petty merged commit 375d724 into main Nov 12, 2026
23 checks passed
@dan-petty
dan-petty deleted the fix/4732-llm-stack-windows branch November 12, 2026 12:38
dan-petty pushed a commit that referenced this pull request Nov 12, 2026
🤖 I have created a release *beep* *boop*
---


##
[0.119.0](v0.118.0...v0.119.0)
(2026-11-12)


### Features

* **repos:** the claim sets In Progress
([#5111](#5111))
([06ef1c6](06ef1c6))
* **roadmap:** a fix-plan step repairs a plan PR with open findings
([#5104](#5104))
([ca5b16d](ca5b16d))
* **roadmap:** extend stage review rounds while open findings drop
([#5090](#5090))
([bacf713](bacf713))
* **roadmap:** re-anchor a stale citation that matches one line
([#5040](#5040))
([16356d8](16356d8))


### Bug Fixes

* **ci:** keep failed test IDs in the service image shard summary
([#5106](#5106))
([88589ef](88589ef))
* **github:** count each page of a paginated GitHub read
([#5070](#5070))
([908e24a](908e24a))
* **github:** keep the metrics permissions out of the runner Job token
([#5064](#5064))
([fb549ff](fb549ff))
* **github:** pace mutations through the clock seam
([#5063](#5063))
([2bd87bc](2bd87bc))
* **k8s:** delete the CoreDNS files that k3s never applies
([#5055](#5055))
([463f601](463f601))
* **monitoring:** tidy LLM stack windows, units and lines
([#5052](#5052))
([375d724](375d724))
* **roadmap:** a refused kept plan uses no stage gate return
([#4983](#4983))
([b8adbca](b8adbca))
* **roadmap:** count a command as removed only when MUST NOT governs it
([#4985](#4985))
([2e6f407](2e6f407))
* **roadmap:** cut prose after a cited stage command
([#4982](#4982))
([a172563](a172563))
* **roadmap:** name every module of a group with no named test
([#5089](#5089))
([27a0e79](27a0e79))
* **roadmap:** stage returns every open review finding to the planner
([#5067](#5067))
([21b116e](21b116e))
* **roadmap:** the alternatives check reads the tools in use
([#5062](#5062))
([8903233](8903233))
* **roadmap:** the constants gate reads 6_500 and no new value
([#5080](#5080))
([8a7b113](8a7b113))
* **roadmap:** the constants gate reads only a stated value
([#5042](#5042))
([cf4733e](cf4733e))
* **telemetry:** read repository traffic as the GitHub App
([#4932](#4932))
([7c42823](7c42823))
* **tests:** close the UDP, DNS and git gaps of the network floor
([#5101](#5101))
([047ee48](047ee48))
* **tests:** repair the bwrap contract suite and gate it
([#5110](#5110))
([9a0659d](9a0659d)),
closes [#4715](#4715)


### Performance Improvements

* **ci:** build the Service image once for its test shards
([#5079](#5079))
([dcf5bd5](dcf5bd5))
* **ci:** run only the required checks on the release PR
([#5057](#5057))
([8174071](8174071))
* **ci:** stop the cache export of pull request image builds
([#5113](#5113))
([ba30820](ba30820))
* **roadmap:** consolidate keeps its vectors in the shared tiers
([#5099](#5099))
([2a8bf1a](2a8bf1a))


### Code Refactoring

* **roadmap:** one Status writer for every job
([#5109](#5109))
([24cfedc](24cfedc))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: dan-petty-release[bot] <346998822+dan-petty-release[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

scope/monitoring Grafana, Prometheus, Loki, alerts and dashboards type/bug Type bug: the code does not do what it must

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix(monitoring): tidy LLM stack windows, units and lines

1 participant