v151 · performance · reporting
Declarative Performance Observer
A proposed Performance-Observer HTTP response header that asks the browser itself to record performance-timeline entries — navigation timing, marks, visibility changes — and deliver one consolidated report via the Reporting API when the session ends, even when JavaScript never ran or the renderer was killed.
PerformanceObserver, User Timing, visibility-state entries, the Reporting API report shape, fetchLater()), and honestly label everything the browser does not yet do.concepts
Header anatomy
Build a real
Performance-Observerheader from live controls —entry-typescheckboxes seeded from this browser's actualPerformanceObserver.supportedEntryTypes, a User Timing allowlist, andcapture-early-failures— then fetch a server route that responds with it and read the negotiated headers back.Journey recorder
Record a real session journey with today's
PerformanceObserver— navigation, marks, measures, and livevisibility-stateentries — and assemble the explainer's exactapplication/reports+jsonpayload from the entries this page actually captured, then POST it to the real reporting endpoint.The reliability gap
See the gap the proposal closes: a live probe for the proposed
session-endentry type, an abrupt-termination experiment where a killed worker's final beacon is provably lost, and the current best answer — a real, feature-detectedfetchLater()deferred beacon.
why it is proposed
Every JavaScript observability API dies with the page. A DNS timeout means no script ever ran, an OOM kill on a low-end phone fires no pagehide, and unload handlers are deprecated because they break the back/forward cache. The proposal moves collection into the browser: a declarative response header activates recording at navigation time, and the browser delivers the consolidated report — including a new PerformanceSessionEndTiming entry — through the Reporting API after the session ends, surviving crashes and early network failures that today are invisible.