tabby/app/lib/sentry.ts

22 lines
602 B
TypeScript
Raw Normal View History

2019-11-26 14:51:31 +00:00
const { init } = process.type === 'main' ? require('@sentry/electron/dist/main') : require('@sentry/electron/dist/renderer')
2019-12-31 21:30:05 +00:00
import * as isDev from 'electron-is-dev'
2019-11-26 14:51:31 +00:00
const SENTRY_DSN = 'https://4717a0a7ee0b4429bd3a0f06c3d7eec3@sentry.io/181876'
let release
try {
release = require('electron').app.getVersion()
} catch {
release = require('electron').remote.app.getVersion()
}
2019-12-31 21:30:05 +00:00
if (!isDev) {
init({
dsn: SENTRY_DSN,
release,
integrations (integrations) {
return integrations.filter(integration => integration.name !== 'Breadcrumbs')
},
})
}