SvelteKit guide

SvelteKit error tracking

Errilo receives your SvelteKit errors from the official @sentry/sveltekit SDK: server routes, load functions 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 SvelteKit 2 app with adapter-node, starts it in production mode and checks that both errors reach Errilo, for every SDK version listed below.

Setup

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

vite.config.ts
import { sentrySvelteKit } from "@sentry/sveltekit/vite"; // SDK 9 and 10: "@sentry/sveltekit"
import { sveltekit } from "@sveltejs/kit/vite";
import { defineConfig } from "vite";

export default defineConfig({
  plugins: [sentrySvelteKit(), sveltekit()],
});

The Sentry plugin goes before sveltekit().

src/hooks.server.ts
import * as Sentry from "@sentry/sveltekit";

Sentry.init({ dsn: process.env.SENTRY_DSN });

export const handle = Sentry.sentryHandle();
export const handleError = Sentry.handleErrorWithSentry();
src/hooks.client.ts
import * as Sentry from "@sentry/sveltekit";
import { env } from "$env/dynamic/public";

Sentry.init({ dsn: env.PUBLIC_SENTRY_DSN });

export const handleError = Sentry.handleErrorWithSentry();

Then set the DSN of your Errilo project. Both are read at runtime: no rebuild needed to change them.

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

Readable stack traces

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

The sentrySvelteKit Vite plugin 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/sveltekit tested against Errilo
Major versionTested version
v9@sentry/[email protected]
v10@sentry/[email protected]
v11@sentry/[email protected]

With SvelteKit 2, Svelte 5 and adapter-node. Not covered by our suite yet: the other adapters (Vercel, Cloudflare, Netlify).

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.