Commit 5e345ad8 authored by 郭志伟's avatar 郭志伟

fix: 调整sentry

parent d61a9ea1
module.exports = {
// Sentry options are required
organization: 'sentry',
project: 'group-buy-ui',
apiKey: '0d3fa45c10f047d7bfe03eb268a93c23a878d7585dc749418f728f88d65e1477',
// Release version name/hash is required
release: 'group-buy-ui@1.0.0',
baseSentryURL: 'http://sentry.quantgroups.com/api/0',
deleteAfterCompile: true,
include: /static\/js\//, // 只上传js和map文件
ignore: ['node_modules'],
suppressErrors: true,
filenameTransform: function (filename) {
return '~/group-buy-ui/public/' + filename
},
}
org: 'sentry',
project: 'group-buy-ui',
authToken: '3f1f6f3789594e3a81280c1cd8d4d1008037a7abad714698b60b6f358c3d7562',
url: 'http://newsentry.quantgroups.com',
dsn: 'http://d36508238b7c4e5fa8306948b52948e1@newsentry.quantgroups.com/11',
release: 'group-buy-ui@1.0.0',
ignore: ['node_modules', 'tests'],
silent: true,
include: [
{
paths: ['./dist/js']
}
]
};
This diff is collapsed.
......@@ -2,6 +2,8 @@
<div class="page error">
<cr-image src="@/assets/images/error/error.png" width="298px" height="153px" />
<p>oh,no…出错了</p>
<button @click="throwError">Throw error</button>
<cr-button type="primary" block shape="circle" @click="backurl">返回</cr-button>
</div>
</template>
......@@ -13,6 +15,9 @@ export default {
},
mounted() {},
methods: {
throwError() {
throw new Error('Sentry Error');
},
backurl() {
this.$router.go(-1);
}
......
......@@ -8,18 +8,24 @@ import '@/service/cherryUI.service';
import './style/index.less';
import saService from '@/service/sa.service';
import Bridge from '@qg/js-bridge';
import Raven from 'raven-js';
import RavenVue from 'raven-js/plugins/vue';
import { release } from '../.sentryclirc';
import * as Sentry from '@sentry/vue';
import { Integrations } from '@sentry/tracing';
import { release, dsn } from '../.sentryclirc';
import lazyload from '@qg/cherry-ui/src/lazyload/index';
import 'intersection-observer';
if (process.env.SENTRY_ENV !== 'test' && process.env.NODE_ENV === 'production') {
Raven.config('//8d1b2a5f74bb42ad806e52a11b1173f2@sentry.q-gp.com/80', {
Sentry.init({
Vue,
dsn,
integrations: [
new Integrations.BrowserTracing({
routingInstrumentation: Sentry.vueRouterInstrumentation(router)
})
],
release,
tracesSampleRate: 1.0, // 上报频率, 1最大, 0最小, 建议验证设置为1, 项目运行根据情况降低频率
environment: process.env.NODE_ENV
})
.addPlugin(RavenVue, Vue)
.install();
});
}
Vue.prototype.util = new Bridge();
Vue.prototype.$track = saService;
......
......@@ -2,7 +2,7 @@ const path = require('path');
const resolve = dir => path.join(__dirname, dir);
const IS_PROD = process.env.NODE_ENV === 'production';
const WebpackCosCdnUploadPlugin = require('@qg/webpack-cos-cdn-upload-plugin');
const SentryPlugin = require('webpack-sentry-plugin');
const SentryPlugin = require('@qg/sentry-webpack-plugin');
const SentryConfig = require('./.sentryclirc');
// cdn预加载使用
const externals = {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment