feat(frontend): integrate @sentry/sveltekit for browser and SSR error reporting to GlitchTip #591
@@ -52,6 +52,8 @@ GLITCHTIP_SECRET_KEY=changeme-generate-a-real-secret
|
||||
SENTRY_DSN=
|
||||
# VITE_SENTRY_DSN: frontend (SvelteKit) — injected at build time via Vite
|
||||
VITE_SENTRY_DSN=
|
||||
# Sentry/GlitchTip auth token for source map upload at build time (optional)
|
||||
SENTRY_AUTH_TOKEN=
|
||||
|
||||
# Production SMTP — uncomment and fill in to send real emails instead of catching them
|
||||
# APP_BASE_URL=https://your-domain.example.com
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import { sentrySvelteKit } from '@sentry/sveltekit';
|
||||
import { paraglideVitePlugin } from '@inlang/paraglide-js';
|
||||
import devtoolsJson from 'vite-plugin-devtools-json';
|
||||
import tailwindcss from '@tailwindcss/vite';
|
||||
@@ -33,6 +34,21 @@ export default defineConfig({
|
||||
}
|
||||
},
|
||||
plugins: [
|
||||
sentrySvelteKit({
|
||||
org: 'familienarchiv',
|
||||
project: 'frontend',
|
||||
authToken: process.env.SENTRY_AUTH_TOKEN,
|
||||
sentryUrl: (() => {
|
||||
const dsn = process.env.VITE_SENTRY_DSN;
|
||||
if (!dsn) return undefined;
|
||||
try {
|
||||
return new URL(dsn).origin;
|
||||
} catch {
|
||||
return undefined;
|
||||
}
|
||||
})(),
|
||||
autoUploadSourceMaps: !!process.env.SENTRY_AUTH_TOKEN
|
||||
}),
|
||||
tailwindcss(),
|
||||
sveltekit(),
|
||||
devtoolsJson(),
|
||||
|
||||
Reference in New Issue
Block a user