Next.js guide

Next.js error tracking

Errilo receives your Next.js errors from the official @sentry/nextjs SDK: route handlers, server rendering and the browser. Already on Sentry? Only the DSN changes.

Updated

Errilo is in development. This guide describes the setup our compatibility suite tests today; the private beta opens in summer 2027.

What gets caught

Our compatibility suite builds a Next.js 15 app with the App Router, starts it in production mode and checks that each of these errors reaches Errilo, for every SDK version listed below.

Setup

These are the files from Sentry’s setup for Next.js. If you already have them, keep them as they are.

instrumentation.ts
import * as Sentry from "@sentry/nextjs";

export async function register() {
  if (process.env.NEXT_RUNTIME === "nodejs") {
    await import("./sentry.server.config");
  }
}

export const onRequestError = Sentry.captureRequestError;

Without onRequestError, errors during server rendering never reach Errilo: our suite checks it.

sentry.server.config.ts
import * as Sentry from "@sentry/nextjs";

Sentry.init({
  dsn: process.env.SENTRY_DSN,
});
instrumentation-client.ts
import * as Sentry from "@sentry/nextjs";

Sentry.init({
  dsn: process.env.NEXT_PUBLIC_SENTRY_DSN,
});
next.config.js
// SDK 9: require("@sentry/nextjs")
const { withSentryConfig } = require("@sentry/nextjs/config");

module.exports = withSentryConfig({
  // your Next.js config
});

Then set the DSN of your Errilo project:

.env
SENTRY_DSN=https://<key>@ingest.errilo.com/<project>
NEXT_PUBLIC_SENTRY_DSN=https://<key>@ingest.errilo.com/<project>

The browser DSN is inlined in the bundle at build time (NEXT_PUBLIC_ variable): rebuild after changing it. The server DSN is read at runtime.

Readable stack traces

In development: source map upload and readable stack traces will be ready for the private beta.

withSentryConfig uploads your source maps at build time. Errilo implements the same upload API: give the plugin Errilo’s address and an Errilo token, and stack traces point to your TypeScript source instead of the compiled code. See the migration guide.

Tested versions

Versions of @sentry/nextjs tested against Errilo
Major versionTested version
v9@sentry/nextjs@9.47.2
v10@sentry/nextjs@10.78.0
v11@sentry/nextjs@11.12.0

With Next.js 15 and the App Router. Not covered by our suite yet: the edge runtime (middleware, edge route handlers) and the Pages Router.

Early access

We’re opening a private beta in summer 2027 for a handful of teams running Node.js or TypeScript in production. Join the waitlist and we’ll write when it opens.