Q: How can I get the Next.js instrumentation to log errors to New Relic Errors Inbox?
A: The Node.js agent has an API to log errors newrelic.noticeError
. Next.js has an error page that can be used to add the API call.
The error page varies between Pages Router and App Router Next.js projects.
- Pages Router error handling example.