feat(main): add sentry

This commit is contained in:
Kim, Jimin 2024-04-28 18:11:24 +09:00
parent 57273779b0
commit dd1325bb84
Signed by: pomp
GPG key ID: 2B516173EDD492EB
6 changed files with 429 additions and 1 deletions

View file

@ -2,3 +2,6 @@
# testing
/test-results
# Sentry Config File
.sentryclirc

View file

@ -20,6 +20,7 @@
"@fontsource/noto-sans-kr": "^5.0.5",
"@inqling/svelte-icons": "^3.5.0",
"@playwright/test": "^1.36.2",
"@sentry/sveltekit": "^7.112.2",
"@sveltejs/adapter-vercel": "^5.3.0",
"@sveltejs/kit": "^2.5.7",
"@sveltejs/vite-plugin-svelte": "^3.1.0",

View file

@ -0,0 +1,12 @@
import { handleErrorWithSentry } from "@sentry/sveltekit"
import * as Sentry from "@sentry/sveltekit"
Sentry.init({
dsn: "https://236b66c6551a16fe6e9356e269c4b1ef@o4507090692210688.ingest.de.sentry.io/4507163100905552",
tracesSampleRate: 1.0,
integrations: [],
})
// If you have a custom error handler, pass it to `handleErrorWithSentry`
export const handleError = handleErrorWithSentry()

View file

@ -0,0 +1,17 @@
import { handleErrorWithSentry, sentryHandle } from "@sentry/sveltekit"
import * as Sentry from "@sentry/sveltekit"
import { sequence } from "@sveltejs/kit/hooks"
Sentry.init({
dsn: "https://236b66c6551a16fe6e9356e269c4b1ef@o4507090692210688.ingest.de.sentry.io/4507163100905552",
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()

View file

@ -1,9 +1,18 @@
import { sentrySvelteKit } from "@sentry/sveltekit"
import { sveltekit } from "@sveltejs/kit/vite"
import path from "path"
import { defineConfig } from "vite"
export default defineConfig({
plugins: [sveltekit()],
plugins: [
sentrySvelteKit({
sourceMapsUploadOptions: {
org: "developomp",
project: "developomp-site-main",
},
}),
sveltekit(),
],
resolve: {
alias: {
$: path.resolve("./src"),