sentryInit.js
464 Bytes
import { dsnUrl } from "~/config";
import { Sentry } from "~/lib/index";
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,
});
}