[.next/trace] Track server requests and memory usage (#58690)
This PR adds more information to `.next/trace` for local development: - Break down server startup times into setting up the dev bundler and running the instrumentation hook - Add top level span for handling a request such as a page request, app router request, or API request - Add span for compilation time tracking the path of the route that triggered the compilation. - Track memory usage after every request - Track event when server is restarted due to reaching the memory limit Platform stats and memory usage on startup:  Memory usage after each request: <img width="340" alt="Screenshot 2023-11-20 at 9 16 44 AM" src="https://github.com/vercel/next.js/assets/7355009/d14279d6-35c5-45a6-b431-b485d5d14ac6"> Split server startup times into setting up the dev bundler and running the instrumentation hook:  Co-authored-by:Tim Neutkens <6324199+timneutkens@users.noreply.github.com>
Showing
Please
register
or
sign in
to comment