← All platforms

Svelte error tracking

Small bundles don’t make bugs impossible. The Sentry Svelte SDK sends browser errors to Telebugs, so the reports live on your server.

~/hoofnotes  npm install @sentry/svelte
~/hoofnotes  nvim src/main.js
import * as Sentry from "@sentry/svelte";
Sentry.init({
// Copy the complete Telebugs DSN, key and path included.
dsn: "YOUR_TELEBUGS_DSN",
});
import { mount } from "svelte";
import App from "./App.svelte";
mount(App, { target: document.getElementById("app") });
~/hoofnotes  npm run dev

Space pauses or resumes. R replays. Escape shows the complete setup.

Hang on, I already use Sentry

Keep @sentry/svelte and change its destination to your Telebugs DSN. Your error reports stay on your server. You don’t need a Sentry account.

Is this the same as SvelteKit?

This page is for a Svelte browser app. SvelteKit has a dedicated SDK for its client and server error hooks. Both work with Telebugs.

Will I recognize my source code?

Yes. Give Telebugs the matching source maps and it can show your original files and line numbers instead of a minified backtrace.