2022-09-27 22:54:37 +02:00
|
|
|
import type { App } from 'vue'
|
|
|
|
import type { Router } from 'vue-router'
|
2021-10-31 13:37:57 +00:00
|
|
|
import {VERSION} from './version.json'
|
|
|
|
|
2022-09-27 22:54:37 +02:00
|
|
|
export default async function setupSentry(app: App, router: Router) {
|
2021-10-26 18:53:17 +00:00
|
|
|
const Sentry = await import('@sentry/vue')
|
|
|
|
const {Integrations} = await import('@sentry/tracing')
|
|
|
|
|
|
|
|
Sentry.init({
|
2021-10-31 13:37:57 +00:00
|
|
|
release: VERSION,
|
2021-10-26 18:53:17 +00:00
|
|
|
app,
|
|
|
|
dsn: window.SENTRY_DSN,
|
|
|
|
integrations: [
|
|
|
|
new Integrations.BrowserTracing({
|
|
|
|
routingInstrumentation: Sentry.vueRouterInstrumentation(router),
|
|
|
|
tracingOrigins: ['localhost', /^\//],
|
|
|
|
}),
|
|
|
|
],
|
|
|
|
tracesSampleRate: 1.0,
|
|
|
|
})
|
|
|
|
}
|