ADR-037: A Public Page of Live Production Numbers
Context
The site's audience hires for cloud and applied-AI roles. The Architecture page explains how the site is built and the ADRs say why, but nothing showed that it actually runs well: "observable, scale-to-zero, cost-guarded" were claims taken on trust. Production already measures what would back them up (Cloud Run request metrics, the cookieless page_views metric, the ai_demo_runs metric, the daily AI budget counters, and one Cloud Run revision per deploy), but only in private dashboards.
Decision
Publish "How this site runs" (/status) built only from those sources; nothing new is collected.
1. One read-only endpoint, GET /api/status/live: availability over 30 days (requests without a server error; 4xx is not downtime), p50/p95 response time over 7 days and p95 per day over 30, page views per day, by source and by country (from the browser time zone, ADR-031), AI calls today against the daily cap and demo runs by type, and the six newest deploys with their release tags.
2. Each section fails on its own: a source that errors returns null and the rest renders. Outside Google Cloud the endpoint reports available: false and calls nothing.
3. Cached for five minutes with one refresh at a time, so page traffic can't multiply Monitoring API calls.
4. Least privilege: the runtime account gets roles/monitoring.viewer and roles/run.viewer, both read-only, in Terraform.
5. The production promotion stamps the v* tag on the new revision as APP_RELEASE, which the deploy history reads back.
6. Charts follow ADR-036: one series in the accent token, a direct label on the busiest day, one keyboard and pointer target per chart, and a table view with every value; axe is clean in both themes and on phones.
7. Only aggregates are public: no visitor data, IPs, user-agents or paths beyond the site's own pages.
Consequences
Benefits:
* The Architecture page's claims now have live evidence: availability, the keep-warm effect on response times, and the AI spend cap at work.
* Nothing new to maintain as data: the same metrics the alerts and dashboards use.
* The footer status line now leads here.
Trade-offs:
* Real numbers are public, including low traffic; the page has to stay honest when they are unflattering.
* It depends on the Monitoring and Cloud Run APIs; the per-section fallback and the cache bound an outage or quota error.
* Daily buckets are 24-hour periods ending at query time, not calendar days; the page says so.
* The runtime identity gains two read-only roles.
Alternatives considered
1. A public Cloud Monitoring dashboard or Looker Studio report: Rejected — needs a Google account or exposes the project, can't match the site's design or language, and can't be cached or shaped.
2. A third-party status page (Statuspage, Better Stack): Rejected — external probes give a different, less complete picture, plus an account and a cost.
3. Numbers baked in at build time: Rejected — stale between releases, which defeats the purpose.
4. Querying from the browser: Rejected — it would need credentials in the client.