Initial commit from monorepo
This commit is contained in:
22
app/plugins/sentry.client.ts
Normal file
22
app/plugins/sentry.client.ts
Normal file
@@ -0,0 +1,22 @@
|
||||
import * as Sentry from '@sentry/vue'
|
||||
|
||||
export default defineNuxtPlugin((nuxtApp) => {
|
||||
const config = useRuntimeConfig()
|
||||
const dsn = config.public.sentryDsn
|
||||
|
||||
if (!dsn) {
|
||||
return
|
||||
}
|
||||
|
||||
Sentry.init({
|
||||
app: nuxtApp.vueApp,
|
||||
dsn,
|
||||
integrations: [
|
||||
Sentry.browserTracingIntegration({ router: nuxtApp.$router }),
|
||||
Sentry.replayIntegration()
|
||||
],
|
||||
tracesSampleRate: 0.1,
|
||||
replaysSessionSampleRate: 0.1,
|
||||
replaysOnErrorSampleRate: 1.0
|
||||
})
|
||||
})
|
||||
Reference in New Issue
Block a user