You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix(monitoring): follow the step in the local-savings query windows #5784
Problem: the local-savings queries of k8s/devops/dashboards/ai-spend.json draw rolling [1h] sums at steps under 1 h (panels 15, 19, 22 and 23). The points overlap and the value is wrong. The 8 savings queries keep the old-label fallback until #2202 (after 2026-11-23). Only their windows change here. Why deferred: tests/fixtures/recorded_queries/ai_spend_local_savings.yaml records the query of the panel 'Local Cloud Savings in Range' as text. tests/prometheus/test_k8s_monitoring_dashboards.py fails when the query changes until a person records it again against live Prometheus. This roadmap cannot read live Prometheus. #2202 rewrites these queries after 2026-11-23, and the window change lands with it. Acceptance criteria: - The 8 local-savings queries use [$__interval] or $__rate_interval in place of each fixed window. - A person re-records tests/fixtures/recorded_queries/ai_spend_local_savings.yaml against live Prometheus. - test_local_cloud_savings_in_range_gives_the_priced_total_of_the_recorded_series passes. - The selectors keep the old-label fallback until #2202.
Related: fix(monitoring): read AI spend from the gateway counter #4724, which asks for a different change. Both items change the local-savings queries of ai-spend.json, but #4724 changes the data source and the candidate changes the query windows.
Pull request #5931 (for #5914) replaces the 8 local-savings queries of ai-spend.json. They read the gateway token counters now, not devops_cli_ai_tokens_total.
Local savings: USD per hour and Local savings by backend server: USD per hour are hourly bars of increase(...[$__interval]) with a Min interval of 1h. The [5m], [1h] and [6h] lines are gone.
tests/fixtures/recorded_queries/ai_spend_local_savings.yaml holds a new record against live Prometheus, and test_local_cloud_savings_in_range_gives_the_priced_total_of_the_recorded_series passes.
No query keeps the old-label fallback, because no query reads the client series.
The pull request does not close this item, because two criteria do not apply as written (the [7d] window and the fallback). After the merge, a person can close it as not planned.
#5931 replaced them. The savings panels of k8s/devops/dashboards/ai-spend.json now use $__interval and $__range. The recorded query fixture and its test are deleted. Panels 19, 22 and 23 (cache share, gateway attempts, callers) still use [1h] windows: #5922 holds them.
Activity
devops-cli-service commentedon Nov 15, 2026
Both items change the local-savings queries of ai-spend.json, but #4724 changes the data source and the candidate changes the query windows.fix(monitoring): read AI spend from the gateway counter (#5924)
dan-petty commentedon Nov 16, 2026
Pull request #5931 (for #5914) replaces the 8 local-savings queries of
ai-spend.json. They read the gateway token counters now, notdevops_cli_ai_tokens_total.increase(...[$__interval])with a Min interval of 1h. The[5m],[1h]and[6h]lines are gone.$__range. The savings of each projection read[7d], the baseline of the spend (fix(monitoring): read AI spend from the gateway counter #4724).tests/fixtures/recorded_queries/ai_spend_local_savings.yamlholds a new record against live Prometheus, andtest_local_cloud_savings_in_range_gives_the_priced_total_of_the_recorded_seriespasses.The pull request does not close this item, because two criteria do not apply as written (the
[7d]window and the fallback). After the merge, a person can close it as not planned.fix(monitoring): price local savings at the reference model (#5931)
dan-petty commentedon Nov 26, 2026
Closed: the savings queries are gone.
#5931 replaced them. The savings panels of
k8s/devops/dashboards/ai-spend.jsonnow use$__intervaland$__range. The recorded query fixture and its test are deleted. Panels 19, 22 and 23 (cache share, gateway attempts, callers) still use[1h]windows: #5922 holds them.