Instrument your Next.js app based on App Router with Laminar
next.config.ts
file:
instrumentation.{ts,js}
file. Learn more about instrumentation.{ts,js}
here.
instrumentation.ts
is experimental in Next.js < 15.next.config.js
:
@vercel/otel
or @sentry/nextjs
.
Otherwise, you can achieve this by using observe
function wrapper, e.g. something like
observe
function wrapper here.