From c907a840ba12356725729d9faf0d5d134533f695 Mon Sep 17 00:00:00 2001 From: Jerry <731238433@qq.com> Date: Tue, 12 Mar 2024 17:04:37 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=A0=E9=99=A4sentry?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .sentryclirc | 7 ------- package.json | 3 --- src/main.js | 19 ------------------- vue.config.js | 14 -------------- 4 files changed, 43 deletions(-) delete mode 100644 .sentryclirc diff --git a/.sentryclirc b/.sentryclirc deleted file mode 100644 index 2744595..0000000 --- a/.sentryclirc +++ /dev/null @@ -1,7 +0,0 @@ -[defaults] -url=http://sentry.myjerry.cn -org=sentry -project=admin-web - -[auth] -token=c114d2f6d5d84331af60f8a8584a3546126ac6c027b34d6584c8072cb365a882 \ No newline at end of file diff --git a/package.json b/package.json index 6392236..9b36e71 100644 --- a/package.json +++ b/package.json @@ -14,8 +14,6 @@ "test:ci": "npm run lint && npm run test:unit" }, "dependencies": { - "@sentry/tracing": "^7.19.0", - "@sentry/vue": "^7.19.0", "axios": "0.18.1", "core-js": "3.6.5", "echarts": "^4.2.1", @@ -30,7 +28,6 @@ "vuex": "3.1.0" }, "devDependencies": { - "@sentry/webpack-plugin": "^1.20.0", "@vue/cli-plugin-babel": "4.4.4", "@vue/cli-plugin-eslint": "4.4.4", "@vue/cli-plugin-unit-jest": "4.4.4", diff --git a/src/main.js b/src/main.js index 66f78bc..956a853 100644 --- a/src/main.js +++ b/src/main.js @@ -18,9 +18,6 @@ import '@/permission' // permission control import * as filters from './filters' // global filters -import * as Sentry from '@sentry/vue' -import { Integrations } from '@sentry/tracing' - // set ElementUI lang to EN Vue.use(ElementUI, { size: Cookies.get('size') || 'mini' }) // 如果想要中文版 element-ui,按如下方式声明 @@ -33,22 +30,6 @@ Object.keys(filters).forEach(key => { Vue.config.productionTip = false -Sentry.init({ - Vue, - dsn: 'http://656d700f0bd944c8bece4753f916b80d@sentry.myjerry.cn/3', - integrations: [ - new Integrations.BrowserTracing({ - routingInstrumentation: Sentry.vueRouterInstrumentation(router), - tracingOrigins: ['localhost', 'my-site-url.com', /^\//] - }) - ], - logErrors: true, - // Set tracesSampleRate to 1.0 to capture 100% - // of transactions for performance monitoring. - // We recommend adjusting this value in production - tracesSampleRate: 1.0 -}) - new Vue({ el: '#app', router, diff --git a/vue.config.js b/vue.config.js index 17b1261..7941a09 100644 --- a/vue.config.js +++ b/vue.config.js @@ -1,6 +1,5 @@ 'use strict' const path = require('path') -const SentryPlugin = require('@sentry/webpack-plugin') const defaultSettings = require('./src/settings.js') const UploadSourceMapWebpackPlugin = require('./build/UploadSourceMapWebpackPlugin'); @@ -137,18 +136,5 @@ module.exports = { config.optimization.runtimeChunk('single') } ) - - if (process.env.NODE_ENV === 'production') { - config.plugin('sentry').use(SentryPlugin, [{ - // 指定忽略文件配置 - ignoreFile: ['node_modules', '.gitignore'], - // 指定上传目录 - include: './dist', - // 指定sentry上传配置 - configFile: './.sentryclirc', - // 保持与publicPath相符 - urlPrefix: '/' - }]) - } } }