2024-05-23 11:50:14 +03:00
|
|
|
import * as Sentry from '@sentry/browser'
|
|
|
|
|
|
|
|
|
|
const sentryDsn = document.querySelector('meta[name="sentry-dsn"]')?.getAttribute('content')
|
|
|
|
|
|
|
|
|
|
if (sentryDsn) {
|
|
|
|
|
Sentry.init({
|
|
|
|
|
dsn: sentryDsn,
|
|
|
|
|
beforeSend (event) {
|
2024-05-23 12:51:41 +03:00
|
|
|
if (event.request.url.match(/\/[ds]\//)) {
|
2024-05-23 11:50:14 +03:00
|
|
|
event.request.url = event.request.url.slice(0, -6)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return event
|
2024-05-23 12:51:41 +03:00
|
|
|
},
|
|
|
|
|
beforeBreadcrumb () {
|
|
|
|
|
return null
|
2024-05-23 11:50:14 +03:00
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}
|