vue-sentry/src/main.js

38 lines
1.0 KiB
JavaScript
Raw Normal View History

2023-04-27 14:07:39 +02:00
import { createApp } from 'vue'
import { createPinia } from 'pinia'
2023-04-27 14:30:05 +02:00
import * as Sentry from "@sentry/vue"
2023-04-27 14:07:39 +02:00
import App from './App.vue'
import router from './router'
import './assets/main.css'
const app = createApp(App)
2023-04-27 14:30:05 +02:00
Sentry.init({
app,
dsn: "https://928141231c6c46718b9631004c903c3f@sentry.derdritte.net/3",
2023-04-27 15:25:53 +02:00
// This sets the sample rate to be 10%. You may want this to be 100% while
// in development and sample at a lower rate in production
replaysSessionSampleRate: 0.1,
// If the entire session is not sampled, use the below sample rate to sample
// sessions when an error occurs.
replaysOnErrorSampleRate: 1.0,
2023-04-27 14:30:05 +02:00
integrations: [
new Sentry.BrowserTracing({
routingInstrumentation: Sentry.vueRouterInstrumentation(router),
}),
2023-04-27 15:25:53 +02:00
new Sentry.Replay()
2023-04-27 14:30:05 +02:00
],
// Set tracesSampleRate to 1.0 to capture 100%
// of transactions for performance monitoring.
// We recommend adjusting this value in production
tracesSampleRate: 1.0,
})
2023-04-27 14:07:39 +02:00
app.use(createPinia())
app.use(router)
app.mount('#app')