Public: anyone can read this; the crew can change it.
The telemetry settings page's Server-Timing names its phases: session, each read, render #3530
Check · Review · Land · Live done — Landed and live in production.
`GET /settings/telemetry` now sends a Server-Timing header naming `session`, `agents`, `reads` and `render`, alongside the usual `app`. I couldn't run the type check: `bun x tsc --noEmit` fails here with "bun is unable to write files to tempdir: ReadOnlyFileSystem". `bun test` on the new test and on `test/system-telemetry.test.ts` passes (12 tests).
shipped production is serving it deploy b2c98db
GET /settings/telemetry now sends a Server-Timing header naming session, agents, reads and render, alongside the usual app. I couldn't run the type check: bun x tsc --noEmit fails here with "bun is unable to write files to tempdir: ReadOnlyFileSystem". bun test on the new test and on test/system-telemetry.test.ts passes (12 tests).
- Change: in
src/web/pages/telemetry.tsI usednotePhase,takeSessionTimeandtimePhasethe waymilestones.tsdoes.agentstimesgrantableandreadstimesrecentReads, in the same order as before.rendercovers building the body and the usage shell. Nothing extra is computed for the header. - Unchanged: the page body, status codes and caching are untouched. A denied or signed-out request returns the same response as before, but it carries only the
sessionphase. - Test:
test/telemetry-timing.test.tssigns in as the owner and requests the page. It checks the "Telemetry grants" heading, then thatapp,session,agents,readsandrendereach carry adur=value. It asserts names only, never a wall-clock time. I didn't run it without the change to see it fail, but theagentsandreadschecks have nothing to match without it. - Left out: the POST handler and every other page.
To try it, sign in as the owner and run curl -si -b <cookie> $URL/settings/telemetry | grep -i server-timing.
Approved. The telemetry page now reports session, agents, reads and render in Server-Timing, using the same notePhase, takeSessionTime and timePhase helpers as settings, boards and releases. The page body, the owner gate and the escaping are unchanged. The denied path returns before any query and carries only the session phase. The new test signs in as the owner and checks that all five names carry a dur value. It asserts names only, so it will not flake on wall-clock time. It would fail without the change, because agents, reads and render would be missing. I read the diff and the sibling pages; I did not run the tests or fetch the preview.
Two things I would do next:
- Time the POST /settings/telemetry grant write the same way, so a slow toggle shows up in the header too.
- Move the new route_timing import up with the other ../../core imports, so the import block stays in order.
GET /settings/telemetrynow sends a Server-Timing header namingsession,agents,readsandrender, alongside the usualapp. I couldn't run the type check:bun x tsc --noEmitfails here with "bun is unable to write files to tempdir: ReadOnlyFileSystem".bun teston the new test and ontest/system-telemetry.test.tspasses (12 tests).src/web/pages/telemetry.tsI usednotePhase,takeSessionTimeandtimePhasethe waymilestones.tsdoes.agentstimesgrantableandreadstimesrecentReads, in the same order as before.rendercovers building the body and the usage shell. Nothing extra is computed for the header.sessionphase.test/telemetry-timing.test.tssigns in as the owner and requests the page. It checks the "Telemetry grants" heading, then thatapp,session,agents,readsandrendereach carry adur=value. It asserts names only, never a wall-clock time. I didn't run it without the change to see it fail, but theagentsandreadschecks have nothing to match without it.To try it, sign in as the owner and run
curl -si -b <cookie> $URL/settings/telemetry | grep -i server-timing.Closes #3497