next.js
f3559326 - Persist Request Insights session history (#97795)

Commit
2 days ago
Persist Request Insights session history (#97795) ## Summary - Keep active requests and the latest 100 completed requests live. Page older summaries and load full details from the current dev-server session's 50 MiB journal. - Complete requests when the outer router and HTTP response settle, so long-running requests and Proxy passes do not finish or disappear prematurely. - Append late spans and fetches to the original record without reopening it or extending its response duration. - Batch adjacent completed-record writes and append incremental late updates. Report journal rotation, and prevent discarded records from being recreated by late work. - Send only new spans and fetches over HMR, up to 128 records per update. Absolute offsets handle snapshot overlap without losing or duplicating records. Initial snapshots and retained history still contain the full records. - Expose retained history through the panel, CLI and MCP. Acquire the dev-directory lock before initializing the journal. History resets with a new dev-server process. This does not depend on the pending Server Action, use-cache, cache-revalidation or after-callback OpenTelemetry producers. ## Verification - 66 focused store and reducer tests passed at this layer, including lifecycle, late updates, pagination, rotation and incremental delivery. - The rebuilt full stack passed 122 focused tests. History loading, filters, trace inspection and live React timing updates passed in four selected development scenarios with each bundler. - Doubling the serialization test from 100 to 200 records now doubles live-update bytes, rather than nearly quadrupling them. --------- Co-authored-by: vercel-fleet-prod[bot] <318278635+vercel-fleet-prod[bot]@users.noreply.github.com> Co-authored-by: Will Binns-Smith <755844+wbinnssmith@users.noreply.github.com>
Author
Parents
Loading