Align sentry configuration of front- and backend
This commit is contained in:
parent
b41d77beb5
commit
6d5e1b3c17
|
@ -1 +1 @@
|
||||||
Add Sentry SDK to collect errors at the backend
|
Add Sentry SDK to collect #1479
|
||||||
|
|
|
@ -28,7 +28,7 @@ const initSentry = async (app: App, router: Router, store: Store<RootState>) =>
|
||||||
})
|
})
|
||||||
],
|
],
|
||||||
debug: import.meta.env.DEV,
|
debug: import.meta.env.DEV,
|
||||||
environment: import.meta.env.MODE,
|
environment: 'front',
|
||||||
beforeSend: (event, hint) => {
|
beforeSend: (event, hint) => {
|
||||||
if (event.exception?.values?.some(exception => exception.mechanism?.handled === false) && hint.originalException instanceof Error) {
|
if (event.exception?.values?.some(exception => exception.mechanism?.handled === false) && hint.originalException instanceof Error) {
|
||||||
useErrorHandler(hint.originalException, hint.event_id)
|
useErrorHandler(hint.originalException, hint.event_id)
|
||||||
|
@ -36,16 +36,15 @@ const initSentry = async (app: App, router: Router, store: Store<RootState>) =>
|
||||||
|
|
||||||
return event
|
return event
|
||||||
},
|
},
|
||||||
// Set tracesSampleRate to 1.0 to capture 100%
|
tracesSampleRate: import.meta.env.FUNKWHALE_SENTRY_SR,
|
||||||
// of transactions for performance monitoring.
|
|
||||||
// We recommend adjusting this value in production
|
|
||||||
tracesSampleRate: 1.0,
|
|
||||||
ignoreErrors: [
|
ignoreErrors: [
|
||||||
// vue3-lazyload throws an error whenever there is a 404
|
// vue3-lazyload throws an error whenever there is a 404
|
||||||
'Image failed to load!'
|
'Image failed to load!'
|
||||||
]
|
]
|
||||||
})
|
})
|
||||||
|
|
||||||
|
Sentry.setTag('mode', import.meta.env.MODE)
|
||||||
|
|
||||||
watchEffect(() => {
|
watchEffect(() => {
|
||||||
const url = store.getters['instance/domain']
|
const url = store.getters['instance/domain']
|
||||||
Sentry.setTag('instance', url)
|
Sentry.setTag('instance', url)
|
||||||
|
|
Loading…
Reference in New Issue