Add logging

This commit is contained in:
wvffle 2022-07-31 20:38:55 +00:00 committed by Georg Krause
parent 5c05407f92
commit 36ada7a225
1 changed files with 5 additions and 1 deletions

View File

@ -5,11 +5,15 @@ import type { App } from 'vue'
const COOKIE = 'allow-tracing' const COOKIE = 'allow-tracing'
const initSentry = async (app: App, router: Router) => { const initSentry = async (app: App, router: Router) => {
const [{ BrowserTracing }, Sentry] = await Promise.all([ const [{ default: useLogger }, { BrowserTracing }, Sentry] = await Promise.all([
import('~/composables/useLogger'),
import('@sentry/tracing'), import('@sentry/tracing'),
import('@sentry/vue') import('@sentry/vue')
]) ])
const logger = useLogger()
logger.info('Initializing Sentry')
Sentry.init({ Sentry.init({
app, app,
dsn: import.meta.env.VUE_SENTRY_DSN, dsn: import.meta.env.VUE_SENTRY_DSN,