mirror of
https://github.com/EnixCoda/Gitako.git
synced 2026-03-11 08:54:44 +00:00
fix: disable few sentry integrations
This commit is contained in:
parent
f3dbe9412f
commit
c0fcf7b971
1 changed files with 8 additions and 1 deletions
|
|
@ -15,6 +15,12 @@ const errorSet = new Set<string>([
|
|||
'Failed to fetch', // network fail in Chrome
|
||||
])
|
||||
|
||||
const disabledIntegrations: string[] = [
|
||||
'TryCatch',
|
||||
'Breadcrumbs',
|
||||
'GlobalHandlers',
|
||||
'CaptureConsole',
|
||||
]
|
||||
const sentryOptions: Sentry.BrowserOptions = {
|
||||
dsn: `https://${PUBLIC_KEY}@sentry.io/${PROJECT_ID}`,
|
||||
release: VERSION,
|
||||
|
|
@ -22,7 +28,8 @@ const sentryOptions: Sentry.BrowserOptions = {
|
|||
// Not safe to activate all integrations in non-Chrome environments where Gitako may not run in top context
|
||||
// https://docs.sentry.io/platforms/javascript/#sdk-integrations
|
||||
defaultIntegrations: IN_PRODUCTION_MODE ? undefined : false,
|
||||
integrations: integrations => integrations.filter(({ name }) => name !== 'TryCatch'),
|
||||
integrations: integrations =>
|
||||
integrations.filter(({ name }) => !disabledIntegrations.includes(name)),
|
||||
beforeSend(event) {
|
||||
const message = event.exception?.values?.[0].value || event.message
|
||||
if (message) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue