What you instrument
- Errors — Sentry / Datadog / Bugsnag for thrown exceptions in Server Components, Server Actions, and Client Components alike.
- Performance — Web Vitals (LCP, CLS, INP) per page; Vercel Speed Insights or your own reporter.
- Logs — structured logs from
consolecalls; pipe them into your log aggregator.
The instrumentation file
instrumentation.ts at the root runs once when the server starts. Use it to initialize Sentry / OpenTelemetry / any monitoring SDK once at boot. Stable since Next.js 15.