fix: sentry

This commit is contained in:
Torsten Dittmann
2024-06-26 13:23:43 +02:00
parent 03f2fa920f
commit 1bda506f2f
4 changed files with 6 additions and 4 deletions

View File

@@ -1,10 +1,10 @@
import { building } from '$app/environment'; import { dev } from '$app/environment';
import { SENTRY_DSN } from '$lib/constants'; import { SENTRY_DSN } from '$lib/constants';
import { handleErrorWithSentry, replayIntegration } from '@sentry/sveltekit'; import { handleErrorWithSentry, replayIntegration } from '@sentry/sveltekit';
import * as Sentry from '@sentry/sveltekit'; import * as Sentry from '@sentry/sveltekit';
Sentry.init({ Sentry.init({
enabled: !!import.meta.env?.SENTRY_AUTH_TOKEN && building, enabled: !!import.meta.env?.SENTRY_AUTH_TOKEN && !dev,
dsn: SENTRY_DSN, dsn: SENTRY_DSN,
tracesSampleRate: 1.0, tracesSampleRate: 1.0,

View File

@@ -3,10 +3,10 @@ import type { Handle } from '@sveltejs/kit';
import redirects from './redirects.json'; import redirects from './redirects.json';
import { sequence } from '@sveltejs/kit/hooks'; import { sequence } from '@sveltejs/kit/hooks';
import { BANNER_KEY, SENTRY_DSN } from '$lib/constants'; import { BANNER_KEY, SENTRY_DSN } from '$lib/constants';
import { building } from '$app/environment'; import { dev } from '$app/environment';
Sentry.init({ Sentry.init({
enabled: !!import.meta.env?.SENTRY_AUTH_TOKEN && building, enabled: !!import.meta.env?.SENTRY_AUTH_TOKEN && !dev,
dsn: SENTRY_DSN, dsn: SENTRY_DSN,
tracesSampleRate: 1 tracesSampleRate: 1
}) })

View File

@@ -0,0 +1 @@
export const prerender = false;

View File

@@ -8,6 +8,7 @@ import { enhancedImages } from '@sveltejs/enhanced-img';
export default defineConfig({ export default defineConfig({
plugins: [ plugins: [
sentrySvelteKit({ sentrySvelteKit({
adapter: 'node',
sourceMapsUploadOptions: { sourceMapsUploadOptions: {
org: 'appwrite', org: 'appwrite',
project: 'website' project: 'website'