mirror of
https://github.com/catdevnull/preciazo.git
synced 2024-11-22 06:16:18 +00:00
enable sentry
This commit is contained in:
parent
84dda9b7e8
commit
2ac54f25f6
6 changed files with 47 additions and 1 deletions
BIN
sepa/bun.lockb
BIN
sepa/bun.lockb
Binary file not shown.
3
sepa/sitio2/.gitignore
vendored
3
sepa/sitio2/.gitignore
vendored
|
@ -19,3 +19,6 @@ Thumbs.db
|
|||
# Vite
|
||||
vite.config.js.timestamp-*
|
||||
vite.config.ts.timestamp-*
|
||||
|
||||
# Sentry Config File
|
||||
.sentryclirc
|
||||
|
|
|
@ -40,6 +40,7 @@
|
|||
},
|
||||
"type": "module",
|
||||
"dependencies": {
|
||||
"@sentry/sveltekit": "^8.30.0",
|
||||
"@types/node": "^22.5.0",
|
||||
"bits-ui": "^0.21.13",
|
||||
"clsx": "^2.1.1",
|
||||
|
|
12
sepa/sitio2/src/hooks.client.ts
Normal file
12
sepa/sitio2/src/hooks.client.ts
Normal file
|
@ -0,0 +1,12 @@
|
|||
import { handleErrorWithSentry } from '@sentry/sveltekit';
|
||||
import * as Sentry from '@sentry/sveltekit';
|
||||
|
||||
if (import.meta.env.PROD) {
|
||||
Sentry.init({
|
||||
dsn: 'https://1177c12a82e0a16aeb1b637bcf392f20@o4507188153548800.ingest.de.sentry.io/4507951835447376',
|
||||
|
||||
tracesSampleRate: 1.0
|
||||
});
|
||||
}
|
||||
// If you have a custom error handler, pass it to `handleErrorWithSentry`
|
||||
export const handleError = handleErrorWithSentry();
|
20
sepa/sitio2/src/hooks.server.ts
Normal file
20
sepa/sitio2/src/hooks.server.ts
Normal file
|
@ -0,0 +1,20 @@
|
|||
import { sequence } from '@sveltejs/kit/hooks';
|
||||
import { handleErrorWithSentry, sentryHandle } from '@sentry/sveltekit';
|
||||
import * as Sentry from '@sentry/sveltekit';
|
||||
|
||||
if (import.meta.env.PROD) {
|
||||
Sentry.init({
|
||||
dsn: 'https://1177c12a82e0a16aeb1b637bcf392f20@o4507188153548800.ingest.de.sentry.io/4507951835447376',
|
||||
|
||||
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();
|
|
@ -1,6 +1,16 @@
|
|||
import { sentrySvelteKit } from '@sentry/sveltekit';
|
||||
import { sveltekit } from '@sveltejs/kit/vite';
|
||||
import { defineConfig } from 'vite';
|
||||
|
||||
export default defineConfig({
|
||||
plugins: [sveltekit()]
|
||||
plugins: [
|
||||
sentrySvelteKit({
|
||||
sourceMapsUploadOptions: {
|
||||
org: 'nulo-inc',
|
||||
project: 'preciazo-sitio2',
|
||||
url: 'https://sentry.io/'
|
||||
}
|
||||
}),
|
||||
sveltekit()
|
||||
]
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue