mirror of
https://github.com/docusealco/docuseal
synced 2026-11-04 22:42:32 -05:00
add sentry
This commit is contained in:
1 parent
2a75055fb6
commit
1405fefc85
7 files changed
+109
-3
No files matched your search
@@ -0,0 +1,16 @@
|
||||
import * as Sentry from '@sentry/browser'
|
||||
|
||||
const sentryDsn = document.querySelector('meta[name="sentry-dsn"]')?.getAttribute('content')
|
||||
|
||||
if (sentryDsn) {
|
||||
Sentry.init({
|
||||
dsn: sentryDsn,
|
||||
beforeSend (event) {
|
||||
if (event.request.url.match(/\/[ds]\/\w+$/)) {
|
||||
event.request.url = event.request.url.slice(0, -6)
|
||||
}
|
||||
|
||||
return event
|
||||
}
|
||||
})
|
||||
}
|
||||
Reference in new issue
Block a user