import * as Sentry from '@sentry/sveltekit'; import { env } from '$env/dynamic/public'; // Sentry / GlitchTip client-side error tracking. // No-op when PUBLIC_GLITCHTIP_DSN is unset (e.g. local dev). if (env.PUBLIC_GLITCHTIP_DSN) { Sentry.init({ dsn: env.PUBLIC_GLITCHTIP_DSN, tracesSampleRate: 0.1, // Must match the release name used when uploading source maps in CI // (BUILD_VERSION injected by Dockerfile as PUBLIC_BUILD_VERSION). release: env.PUBLIC_BUILD_VERSION || undefined }); } export const handleError = Sentry.handleErrorWithSentry();