Commit Graph
3 Commits
Author SHA1 Message Date
Sebastian UnterschützandClaude Opus 5.5 1138d555aa perf: load console pages in time for organizations with many monitors
ci / lint (push) Skipped
ci / image (push) Skipped
ci / test (push) Skipped
ci / build (push) Skipped
ci / test (pull_request) Successful in 12m19s
ci / lint (pull_request) Successful in 11m10s
ci / build (pull_request) Successful in 18m13s
ci / image (pull_request) Successful in 5m20s
Every console page that shows monitor status (monitors, incidents,
monitor details, evidence) went through one loader that read, for all of
the organization's monitors:

- the newest result per monitor and region, by scanning a day of raw
  results;
- the bars of the selected range, from raw results for ranges up to 24h,
  though only one page of monitors is shown;
- when each monitor first reported, scanning two days of results.

With 3000 monitors that took about a second, growing with the number of
results. Now:

- latest_results keeps the newest result per monitor and region,
  updated as results are stored (migration 00055 fills it from the last
  day);
- bars are loaded only for the monitors a page shows;
- first data is loaded per monitor on its page, and the monitor list asks
  only for the organization's earliest data, by index;
- monitor, region and incident queries name the organization, so their
  indexes are used instead of row security filtering whole tables.

Public status pages also read only their own monitors' latest results
and hourly buckets instead of the whole organization's.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017GpWAskjmYtZpuQ5JwYTX3
2026-11-26 08:00:38 +01:00
Sebastian UnterschützandClaude Opus 5.5 d7c5cd711e feat: page long and truncated lists
ci / lint (pull_request) Successful in 15m0s
ci / image (pull_request) Successful in 3m18s
ci / build (pull_request) Successful in 8m38s
ci / test (pull_request) Successful in 12m6s
Lists that were cut off by a fixed LIMIT, or could grow without bound,
are paged by keyset: the cursor holds the sort key and an ID, so pages
neither skip nor repeat items as others are added. The audit logs had a
timestamp-only cursor that could skip entries with equal times.

The API returns at most 100 items per list (limit takes up to 500) with
next_cursor and prev_cursor, passed back as after and before. The
console shows Newer/Older (or Previous/Next) links and To the start,
without JavaScript.

Paged: incidents (optionally of one monitor), a monitor's results and
evidence, a checker's results, the audit logs, members, maintenance
windows, firing Alertmanager alerts, the monitors API and the admin
lists of status pages and organizations, which move to their own admin
pages. A monitor's page shows its latest incidents and results and links
to all of them. The dashboard caps every group at 50 of its own monitors
with a link to a paged view of the group, and gains a search by name or
target. Lists filtered by permission after reading may show fewer items
on a page.

Closes #116

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017GpWAskjmYtZpuQ5JwYTX3
2026-11-22 21:40:25 +01:00
Sebastian UnterschützandClaude Opus 5.5 43b0a35f20 feat: maintenance windows and Markdown descriptions
Monitors and groups get one-off or recurring maintenance. While it is in
progress, failures neither open incidents nor alert, so the SLA is not
affected; successes still resolve earlier incidents. The console shows
monitors under maintenance and lists windows on a new page and on
monitor pages. Status pages announce maintenance in progress and planned
for the next two weeks and mark affected components; the occurrences are
part of the snapshot and evaluated when the page is shown, so this also
works from cache during an API outage. Maintenance and status page
descriptions are rendered as Markdown.

Closes #71

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017GpWAskjmYtZpuQ5JwYTX3
2026-11-22 10:38:31 +01:00