Commit 8e0b2196 authored by guang.wu's avatar guang.wu

fix: 去掉sentry相关代码

parent a722eb43
const pkgInfo = require('./package.json');
const project = pkgInfo.name;
module.exports = {
org: 'sentry',
project,
authToken: '3f1f6f3789594e3a81280c1cd8d4d1008037a7abad714698b60b6f358c3d7562',
url: 'http://newsentry.quantgroups.com',
release: `${project}@1.0.0`,
ignore: ['node_modules', 'tests'],
silent: true,
include: [
{
paths: ['./dist'],
},
],
};
...@@ -5,13 +5,8 @@ ...@@ -5,13 +5,8 @@
import ThemeColorReplacer from 'webpack-theme-color-replacer'; import ThemeColorReplacer from 'webpack-theme-color-replacer';
import generate from '@ant-design/colors/lib/generate'; import generate from '@ant-design/colors/lib/generate';
import webpack from 'webpack'; import webpack from 'webpack';
const SentryPlugin = require('@qg/sentry-webpack-plugin');
const SentryConfig = require('../.sentryclirc');
export default config => { export default config => {
if (process.env.NODE_ENV === 'production') {
config.plugin('sentry-webpack-plugin').use(SentryPlugin, [SentryConfig]);
}
// preview.pro.ant.design only do not use in your production; // preview.pro.ant.design only do not use in your production;
if ( if (
process.env.ANT_DESIGN_PRO_ONLY_DO_NOT_USE_IN_YOUR_PRODUCTION === 'site' || process.env.ANT_DESIGN_PRO_ONLY_DO_NOT_USE_IN_YOUR_PRODUCTION === 'site' ||
......
...@@ -16,7 +16,6 @@ ...@@ -16,7 +16,6 @@
"@ant-design/pro-layout": "^4.11.4", "@ant-design/pro-layout": "^4.11.4",
"@ant-design/pro-table": "^1.0.31", "@ant-design/pro-table": "^1.0.31",
"@antv/data-set": "^0.10.2", "@antv/data-set": "^0.10.2",
"@sentry/react": "^7.41.0",
"antd": "^4.24.10", "antd": "^4.24.10",
"antd-img-crop": "4.12.2", "antd-img-crop": "4.12.2",
"antd-virtual-select": "^1.1.2", "antd-virtual-select": "^1.1.2",
...@@ -53,7 +52,6 @@ ...@@ -53,7 +52,6 @@
}, },
"devDependencies": { "devDependencies": {
"@ant-design/pro-cli": "^1.0.13", "@ant-design/pro-cli": "^1.0.13",
"@qg/sentry-webpack-plugin": "^1.19.0",
"@types/classnames": "^2.2.7", "@types/classnames": "^2.2.7",
"@types/express": "^4.17.0", "@types/express": "^4.17.0",
"@types/history": "^4.7.2", "@types/history": "^4.7.2",
...@@ -6450,19 +6448,6 @@ ...@@ -6450,19 +6448,6 @@
"node": ">= 8" "node": ">= 8"
} }
}, },
"node_modules/@qg/sentry-webpack-plugin": {
"version": "1.19.0",
"resolved": "http://npmprivate.quantgroups.com/@qg%2fsentry-webpack-plugin/-/sentry-webpack-plugin-1.19.0.tgz",
"integrity": "sha512-3YL+cMVdHlb3EQG3kljxduu4hxo+t4ISYx0qMYS+VOlmLEH0MIP5Gxz4Oe0obExonUt2N4oUB0tNo7ycQqxt8w==",
"dev": true,
"license": "MIT",
"dependencies": {
"@qg/sentry-cli": "1.74.5"
},
"engines": {
"node": ">= 8"
}
},
"node_modules/@qixian.cs/path-to-regexp": { "node_modules/@qixian.cs/path-to-regexp": {
"version": "6.1.0", "version": "6.1.0",
"resolved": "https://registry.npmjs.org/@qixian.cs/path-to-regexp/-/path-to-regexp-6.1.0.tgz", "resolved": "https://registry.npmjs.org/@qixian.cs/path-to-regexp/-/path-to-regexp-6.1.0.tgz",
...@@ -6509,91 +6494,6 @@ ...@@ -6509,91 +6494,6 @@
} }
} }
}, },
"node_modules/@sentry/browser": {
"version": "7.41.0",
"resolved": "http://npmprivate.quantgroups.com/@sentry%2fbrowser/-/browser-7.41.0.tgz",
"integrity": "sha512-ZEtgTXPOHZ9/Qn42rr9ZAPTKCV6fAjyDC4FFWMGP4HoUqJqr2woRddP9O5n1jvjsoIPAFOmGzbCuZwFrPVVnpQ==",
"license": "MIT",
"dependencies": {
"@sentry/core": "7.41.0",
"@sentry/replay": "7.41.0",
"@sentry/types": "7.41.0",
"@sentry/utils": "7.41.0",
"tslib": "^1.9.3"
},
"engines": {
"node": ">=8"
}
},
"node_modules/@sentry/core": {
"version": "7.41.0",
"resolved": "http://npmprivate.quantgroups.com/@sentry%2fcore/-/core-7.41.0.tgz",
"integrity": "sha512-yT3wl3wMfPymstIZRWNjuov4xhieIEPD0z9MIW9VmoemqkD5BEZsgPuvGaVIyQVMyx61GsN4H4xd0JCyNqNvLg==",
"license": "MIT",
"dependencies": {
"@sentry/types": "7.41.0",
"@sentry/utils": "7.41.0",
"tslib": "^1.9.3"
},
"engines": {
"node": ">=8"
}
},
"node_modules/@sentry/react": {
"version": "7.41.0",
"resolved": "http://npmprivate.quantgroups.com/@sentry%2freact/-/react-7.41.0.tgz",
"integrity": "sha512-Ajt71pa6Nj4h3hLi2LeS25miVqMv1Zt5NPX5QpSvlPxFRJiIYPOQRWRt0r1pMYR5wD+Y54hJDue+EcWS1H3AKA==",
"license": "MIT",
"dependencies": {
"@sentry/browser": "7.41.0",
"@sentry/types": "7.41.0",
"@sentry/utils": "7.41.0",
"hoist-non-react-statics": "^3.3.2",
"tslib": "^1.9.3"
},
"engines": {
"node": ">=8"
},
"peerDependencies": {
"react": "15.x || 16.x || 17.x || 18.x"
}
},
"node_modules/@sentry/replay": {
"version": "7.41.0",
"resolved": "http://npmprivate.quantgroups.com/@sentry%2freplay/-/replay-7.41.0.tgz",
"integrity": "sha512-/vxuO17AysCoBbCl9wCwjsCFBD4lEbYgfC1GJm8ayWwPU1uhvZcEx6reUwi0rEFpWYGHSHh3+gi+QsOcY/EmnQ==",
"license": "MIT",
"dependencies": {
"@sentry/core": "7.41.0",
"@sentry/types": "7.41.0",
"@sentry/utils": "7.41.0"
},
"engines": {
"node": ">=12"
}
},
"node_modules/@sentry/types": {
"version": "7.41.0",
"resolved": "http://npmprivate.quantgroups.com/@sentry%2ftypes/-/types-7.41.0.tgz",
"integrity": "sha512-4z9VdObynwd64i0VHCqkeIAHmsFzapL21qN41Brzb7jY/eGxjn/0rxInDGH+vkoE9qacGqiYfWj4vRNPLsC/bw==",
"license": "MIT",
"engines": {
"node": ">=8"
}
},
"node_modules/@sentry/utils": {
"version": "7.41.0",
"resolved": "http://npmprivate.quantgroups.com/@sentry%2futils/-/utils-7.41.0.tgz",
"integrity": "sha512-SL+MGitvkakbkrOTb48rDuJp9GYx/veB6EOzYygh49+zwz4DGM7dD4/rvf/mVlgmXUzPgdGDgkVmxgX3nT7I7g==",
"license": "MIT",
"dependencies": {
"@sentry/types": "7.41.0",
"tslib": "^1.9.3"
},
"engines": {
"node": ">=8"
}
},
"node_modules/@sinonjs/commons": { "node_modules/@sinonjs/commons": {
"version": "1.8.3", "version": "1.8.3",
"resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-1.8.3.tgz", "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-1.8.3.tgz",
...@@ -45445,15 +45345,6 @@ ...@@ -45445,15 +45345,6 @@
} }
} }
}, },
"@qg/sentry-webpack-plugin": {
"version": "1.19.0",
"resolved": "http://npmprivate.quantgroups.com/@qg%2fsentry-webpack-plugin/-/sentry-webpack-plugin-1.19.0.tgz",
"integrity": "sha512-3YL+cMVdHlb3EQG3kljxduu4hxo+t4ISYx0qMYS+VOlmLEH0MIP5Gxz4Oe0obExonUt2N4oUB0tNo7ycQqxt8w==",
"dev": true,
"requires": {
"@qg/sentry-cli": "1.74.5"
}
},
"@qixian.cs/path-to-regexp": { "@qixian.cs/path-to-regexp": {
"version": "6.1.0", "version": "6.1.0",
"resolved": "https://registry.npmjs.org/@qixian.cs/path-to-regexp/-/path-to-regexp-6.1.0.tgz", "resolved": "https://registry.npmjs.org/@qixian.cs/path-to-regexp/-/path-to-regexp-6.1.0.tgz",
...@@ -45484,64 +45375,6 @@ ...@@ -45484,64 +45375,6 @@
"any-observable": "^0.3.0" "any-observable": "^0.3.0"
} }
}, },
"@sentry/browser": {
"version": "7.41.0",
"resolved": "http://npmprivate.quantgroups.com/@sentry%2fbrowser/-/browser-7.41.0.tgz",
"integrity": "sha512-ZEtgTXPOHZ9/Qn42rr9ZAPTKCV6fAjyDC4FFWMGP4HoUqJqr2woRddP9O5n1jvjsoIPAFOmGzbCuZwFrPVVnpQ==",
"requires": {
"@sentry/core": "7.41.0",
"@sentry/replay": "7.41.0",
"@sentry/types": "7.41.0",
"@sentry/utils": "7.41.0",
"tslib": "^1.9.3"
}
},
"@sentry/core": {
"version": "7.41.0",
"resolved": "http://npmprivate.quantgroups.com/@sentry%2fcore/-/core-7.41.0.tgz",
"integrity": "sha512-yT3wl3wMfPymstIZRWNjuov4xhieIEPD0z9MIW9VmoemqkD5BEZsgPuvGaVIyQVMyx61GsN4H4xd0JCyNqNvLg==",
"requires": {
"@sentry/types": "7.41.0",
"@sentry/utils": "7.41.0",
"tslib": "^1.9.3"
}
},
"@sentry/react": {
"version": "7.41.0",
"resolved": "http://npmprivate.quantgroups.com/@sentry%2freact/-/react-7.41.0.tgz",
"integrity": "sha512-Ajt71pa6Nj4h3hLi2LeS25miVqMv1Zt5NPX5QpSvlPxFRJiIYPOQRWRt0r1pMYR5wD+Y54hJDue+EcWS1H3AKA==",
"requires": {
"@sentry/browser": "7.41.0",
"@sentry/types": "7.41.0",
"@sentry/utils": "7.41.0",
"hoist-non-react-statics": "^3.3.2",
"tslib": "^1.9.3"
}
},
"@sentry/replay": {
"version": "7.41.0",
"resolved": "http://npmprivate.quantgroups.com/@sentry%2freplay/-/replay-7.41.0.tgz",
"integrity": "sha512-/vxuO17AysCoBbCl9wCwjsCFBD4lEbYgfC1GJm8ayWwPU1uhvZcEx6reUwi0rEFpWYGHSHh3+gi+QsOcY/EmnQ==",
"requires": {
"@sentry/core": "7.41.0",
"@sentry/types": "7.41.0",
"@sentry/utils": "7.41.0"
}
},
"@sentry/types": {
"version": "7.41.0",
"resolved": "http://npmprivate.quantgroups.com/@sentry%2ftypes/-/types-7.41.0.tgz",
"integrity": "sha512-4z9VdObynwd64i0VHCqkeIAHmsFzapL21qN41Brzb7jY/eGxjn/0rxInDGH+vkoE9qacGqiYfWj4vRNPLsC/bw=="
},
"@sentry/utils": {
"version": "7.41.0",
"resolved": "http://npmprivate.quantgroups.com/@sentry%2futils/-/utils-7.41.0.tgz",
"integrity": "sha512-SL+MGitvkakbkrOTb48rDuJp9GYx/veB6EOzYygh49+zwz4DGM7dD4/rvf/mVlgmXUzPgdGDgkVmxgX3nT7I7g==",
"requires": {
"@sentry/types": "7.41.0",
"tslib": "^1.9.3"
}
},
"@sinonjs/commons": { "@sinonjs/commons": {
"version": "1.8.3", "version": "1.8.3",
"resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-1.8.3.tgz", "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-1.8.3.tgz",
/* eslint-disable no-console */ /* eslint-disable no-console */
import * as Sentry from '@sentry/react';
import localStorage from '@/utils/localStorage';
if (process.env.SENTRY_ENV !== 'prod' && process.env.NODE_ENV === 'production') {
try {
Sentry.init({
dsn: 'https://b3f60c62e1234e26a5b851b9f26fba07@sentry.q-gp.com/34',
release: 'merchant-manage-ui@1.0.0',
maxBreadcrumbs: 50,
tracesSampleRate: 1,
beforeSend: e => {
const err = e.exception?.values || [];
// XXX 不上报[object Object]此类基础库异常
if (err.some(item => item.value.indexOf('ResizeObserver') > -1)) {
return null;
}
return e;
},
});
Sentry.configureScope(scope => {
scope.setUser({
token: localStorage.get('token') || null,
});
});
} catch (e) {
console.log('Sentry无法加载', e);
}
}
export const dva = { export const dva = {
config: { config: {
onError(e) { onError(e) {
......
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