Integrations
Next.js
Instrument your Next.js app based on App Router with Laminar
Overview
Also see the Next.js guide for a step-by-step guide with a small example app.
Next.js is a popular React framework for building web applications.
Getting Started
1. Install Laminar
2. Initialize Laminar
To instrument your entire Next.js app, place Laminar initialization in instrumentation.{ts,js}
file. Learn more about instrumentation.{ts,js}
here.
instrumentation.ts
instrumentation.ts
is experimental in Next.js < 15.
If you use Next.js < 15, add the following to your next.config.js
:
next.config.js