sentry-svelte-sdk

Automate Sentry SDK setup for Svelte and SvelteKit projects.

20|3|Updated Jan 8, 2026
One-click install
npx skills add https://github.com/getsentry/sentry-agent-skills --skill sentry-svelte-sdk
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: sentry-svelte-sdk
Source: https://github.com/getsentry/sentry-agent-skills/tree/main/skills/sentry-svelte-sdk
Command: npx skills add https://github.com/getsentry/sentry-agent-skills --skill sentry-svelte-sdk

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Svelte and SvelteKit projects often struggle to implement reliable, end-to-end observability. This skill provides an opinionated, ready-to-use setup that covers client and server initialization, instrumentation hooks, and optional source map configuration for Vite, ensuring consistent error monitoring, tracing, session replay, and logging across the stack.

Core Features & Use Cases

  • Opinionated Svelte/SvelteKit Sentry setup that wires error monitoring, tracing, session replay, and logging across client and server.
  • Supports both modern (SvelteKit ≥2.31.0) and legacy setups, with guidance for choosing the right integration path.
  • Real-world use: quickly bootstrap observability for new projects or migrations, enabling faster issue detection and resolution.

Quick Start

Install the Sentry SDK and wire it into your SvelteKit app by following the recommended setup path to enable error monitoring, tracing, and session replay.

Frequently Asked Questions about sentry-svelte-sdk

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I set up Sentry error monitoring and tracing in a SvelteKit app?

Sentry SDK setup for SvelteKit involves initializing error monitoring, tracing, and session replay across client and server boundaries, wiring instrumentation hooks, and optionally configuring Vite source maps for complete stack observability.

Can I configure Sentry session replay and logging for both client and server in Svelte?

Yes, Sentry session replay and logging can be configured across both client and server in Svelte. This setup wires front-end and back-end initialization together, ensuring consistent observability across the entire stack.

Does this Sentry setup support older SvelteKit projects or only modern versions?

This Sentry setup supports both modern (SvelteKit ≥2.31.0) and legacy setups. It provides guidance for choosing the right integration path, ensuring compatibility whether you are starting a new project or migrating an older codebase.

What is the best way to migrate an existing Svelte app to include end-to-end observability?

The best way to add end-to-end observability during a Svelte migration is to apply an opinionated Sentry setup that consolidates client and server initialization, wires instrumentation hooks, and configures Vite source maps, enabling faster issue detection.

How do I configure Vite source maps for Sentry in a SvelteKit project?

To configure Vite source maps for Sentry in a SvelteKit project, you apply the optional source map configuration provided during SDK setup. This ensures errors are accurately mapped to original source code for easier debugging across client and server.