YesPlayMusic/src/main/sentry.ts

18 lines
544 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'
import pkg from '../../package.json'
import logger from './logger'
logger.info(`[sentry] init sentry`)
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,
})