Add sentry front-end tracking

This commit is contained in:
Julien Nahum
2023-10-08 13:35:15 +01:00
parent 54f92f844f
commit 23e323af95
8 changed files with 229 additions and 181 deletions

View File

@@ -2,3 +2,4 @@ import './axios'
import './vue-plugins'
import './amplitude'
import './vapor'
import './sentry'

17
resources/js/plugins/sentry.js vendored Normal file
View File

@@ -0,0 +1,17 @@
import Vue from 'vue'
import * as Sentry from '@sentry/vue'
if (window.config.sentry_dsn) {
Sentry.init({
Vue,
dsn: window.config.sentry_dsn,
integrations: [],
// Performance Monitoring
tracesSampleRate: 0.01,
logErrors: true,
debug: false
})
if (!window.config.production) {
console.info('== Sentry enabled ==')
}
}