Errors in a web app's pages reach Logs and alerts
Logs recorded actions, webhooks and extension calls, but nothing for a web app's own pages and route handlers, so a page that crashed in production made no event, no alert email and no incident. Now production's requests to your pages and routes are logged as request events with the status the visitor got and how long the app took, and when a page, route handler, Server Action or middleware throws, the event carries the error, its stack and the route. A 5xx from a page alerts like a failing action, and Ops charts these requests with the rest.
Every build now adds Next.js's instrumentation.ts with an onRequestError hook from the SDK, so errors are reported after your next deploy. If your app has its own instrumentation.ts, it keeps working: the build runs it behind ours.
Requests are logged up to 300 an hour per environment, then only 5xx answers and those slower than a second. Assets are logged only when they fail. With the Sentry integration, page errors go to Sentry too.
More in Page errors.