YesPlayMusic/packages/electron/main/sentry.ts

20 lines
587 B
TypeScript
Raw Normal View History

2022-03-27 15:21:48 +08:00
import * as Sentry from '@sentry/node'
import * as Tracing from '@sentry/tracing'
2022-05-13 19:30:13 +08:00
import pkg from '../../../package.json'
2022-04-16 13:30:25 +08:00
import log from './log'
2022-04-16 13:30:25 +08:00
log.info(`[sentry] sentry initializing`)
2022-03-27 15:21:48 +08:00
Sentry.init({
dsn: 'https://2aaaa67f1c3d4d6baefafa5d58fcf340@o436528.ingest.sentry.io/6274637',
release: `yesplaymusic@${pkg.version}`,
2022-03-30 00:53:05 +08:00
environment: process.env.NODE_ENV,
2022-03-27 15:21:48 +08:00
// Set tracesSampleRate to 1.0 to capture 100%
// of transactions for performance monitoring.
// We recommend adjusting this value in production
tracesSampleRate: 1.0,
})
2022-04-02 00:45:20 +08:00
2022-04-16 13:30:25 +08:00
log.info(`[sentry] sentry initialized`)