@interfere/next connects browser errors, session replay, and server requests to the same surface. The build plugin uploads source maps so investigations can show your original code.
You need a Next.js 16 or later App Router app, React 19, and Node.js 20 or later. Create a surface before starting; its keys connect this app to your workspace.
Setup
1
Install the package
2
Set your keys
Copy the keys from your surface into your deployment’s environment variables. Set both for builds; the runtime needs the public key.Use
production for your production deployment. Keep the secret key out of browser code. These variables do not need a NEXT_PUBLIC_ prefix.3
Connect your build
Wrap your existing Next.js config. The plugin registers releases and uploads source maps during production builds.Keep
next.config.ts
withInterfere() outermost when composing config wrappers. See Releases and source maps if another tool also uploads source maps.4
Start server and browser capture
Create If you already initialize OpenTelemetry, follow OpenTelemetry composition instead of registering a second provider.Create
instrumentation.ts in the project root, or inside src if your app uses a src directory.instrumentation.ts
instrumentation-client.ts beside instrumentation.ts. Next.js loads it before the app becomes interactive.instrumentation-client.ts
5
Wrap your root layout
Wrap the root layout. The provider exposes identity and consent hooks and reports React render errors. Browser capture still requires the Before recording customer sessions, set consent at initialization and review replay masking.
init() call above.app/layout.tsx