upend/webui/src/hooks.server.ts

18 lines
708 B
TypeScript

import { sequence } from '@sveltejs/kit/hooks';
import * as Sentry from '@sentry/sveltekit';
import { handleErrorWithSentry, sentryHandle } from '@sentry/sveltekit';
Sentry.init({
dsn: 'https://9b966481f93abec5d80f1d48dd1afec1@o4506614333308928.ingest.us.sentry.io/4506614334423040',
tracesSampleRate: 1.0
// uncomment the line below to enable Spotlight (https://spotlightjs.com)
// spotlight: import.meta.env.DEV,
});
// If you have custom handlers, make sure to place them after `sentryHandle()` in the `sequence` function.
export const handle = sequence(sentryHandle());
// If you have a custom error handler, pass it to `handleErrorWithSentry`
export const handleError = handleErrorWithSentry();