trace: detect rage restarts and deleted .next dirs (#92489)
**This is only sent if there is an explicit, user-provided `--experimental-upload-trace` set.** Adds two new attributes to the `start-dev-server` span when `--experimental-upload-trace` is set: - `rage-restart` — true if the server was restarted within 2 minutes of last stopping - `missing-next-dir` — true if the `.next` dir from the previous session was deleted before restart State (stop time + dist dir path) is written to a temp file outside `.next` on graceful shutdown, so it survives `rm -rf .next`. Detection results are passed to the child via `NEXT_PRIVATE_DEV_SPAN_ATTRS`, following the same pattern as `NEXT_PRIVATE_ENABLED_FEATURES`. Test Plan: Added an e2e test. <!-- NEXT_JS_LLM_PR --> --------- Co-authored-by:Will Binns-Smith <wbinnssmith@users.noreply.github.com> Co-authored-by:
Claude <noreply@anthropic.com>
Showing
This source diff could not be displayed because it is too large.
You can
view the blob
instead.
Please
register
or
sign in
to comment