sentryInit.js
474 Bytes
import { dsnUrl } from '~/config'
import * as Sentry from '~/utils/lib/sentry-miniapp'
export default function sentryInit() {
// accountInfo.miniProgram.envVersion == 'release' &&
const accountInfo = wx.getAccountInfoSync()
//测试和生产才开发sentry
const env = ['trial', 'release']
env.includes(accountInfo.miniProgram.envVersion) &&
Sentry.init({
// dsn: 'http://ebcf31c417cc4ce185782f046e4a87a2@sentry.glsx.com.cn/5'
dsn: dsnUrl
})
}