Skip to content

metrics: the tiles read over the selected range - #317

Merged
aaylward merged 4 commits into
mainfrom
claude/metrics-range
Sep 7, 2026
Merged

metrics: the tiles read over the selected range#317
aaylward merged 4 commits into
mainfrom
claude/metrics-range

Conversation

@aaylward

@aaylward aaylward commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

Client half of muchq/MoonBase#1507. The scalar request carries range= alongside view=, so the tiles read over the same span as the charts under them, and the requests tile is captioned by the window the proxy echoes (Req (1d), Req (7d)) rather than a fixed Req (5m). A proxy that echoes a view but no window keeps Req (5m); one older than both keeps Total. success_count_5m/failure_count_5m follow the proxy's rename to success_count/failure_count; nothing rendered them.

The span is said once for the whole page, on the control the reader already uses: the range options read last 30m, last 1d, last 7d. Every chart and, from a proxy that takes a range, every tile is over it; the one that is not, the Active gauge, is captioned Active (now).

At 7d every tile is a week-long instant query, and a page of them every thirty seconds is the one load this dashboard adds to Prometheus, so a week refetches every five minutes; a week's count does not move in half a minute. Shorter ranges stay at thirty seconds.

Tests: the range on the tiles request, on the same request that names the view; the caption following the echoed window across a range change, and staying on the old number while the new answer is out; the two older captions unchanged; the select and the gauge saying their spans; a week not refetched at thirty seconds and refetched at five minutes.

504 tests, lint, typecheck and build clean.

🤖 Generated with Claude Code

https://claude.ai/code/session_01NvyU4MCzgsmRNa33yW1YNM

The scalar request carries the range the charts are on, and the
requests tile is captioned by the window the proxy says it read over
(MoonBase#1507), not a fixed five minutes. Older proxies keep their
old caption.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NvyU4MCzgsmRNa33yW1YNM
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Sep 7, 2026

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
muchq 21297b6 Commit Preview URL

Branch Preview URL
Sep 07 2026, 07:22 PM

Options read "last 1d" so the one control the reader already uses
names the window every chart and tile is over; Active, a gauge, is
captioned as the exception.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NvyU4MCzgsmRNa33yW1YNM
While a range change is still out, the old number keeps its old
caption; the tiles request is checked to name view and range together.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NvyU4MCzgsmRNa33yW1YNM
At 7d every tile is a week-long instant query (MoonBase#1507), and a
page of them every thirty seconds is the load this dashboard adds to
Prometheus; a week's count does not move in half a minute. Shorter
ranges stay at thirty seconds.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NvyU4MCzgsmRNa33yW1YNM
@aaylward
aaylward merged commit 5efef44 into main Sep 7, 2026
2 checks passed
@aaylward
aaylward deleted the claude/metrics-range branch September 7, 2026 19:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants