1
1
mirror of https://github.com/Eugeny/tabby.git synced 2024-12-22 18:11:43 +03:00
tabby/app/lib/sentry.ts
2021-06-29 23:57:04 +02:00

20 lines
592 B
TypeScript
Executable File

const { init } = String(process.type) === 'main' ? require('@sentry/electron/dist/main') : require('@sentry/electron/dist/renderer')
const SENTRY_DSN = 'https://4717a0a7ee0b4429bd3a0f06c3d7eec3@sentry.io/181876'
let release = null
try {
release = require('electron').app.getVersion()
} catch {
release = require('@electron/remote').app.getVersion()
}
if (!process.env.TABBY_DEV) {
init({
dsn: SENTRY_DSN,
release,
integrations (integrations) {
return integrations.filter(integration => integration.name !== 'Breadcrumbs')
},
})
}