xys-monitor
Version:
A project named xys-monitor
31 lines (30 loc) • 1.28 kB
JavaScript
//let releaseList = ['admin.xinhulu.com']
// let backendalertUrl = ''
// const match = location.host.match(/(beta|alpha)\.xinhulu\.com/i)
// if (match) {
// backendalertUrl = 'https:' + '//' + match[0] + '/util/reportErr'
// } else if (/xinhulu/i.test(location.host)) {
// backendalertUrl = 'https:' + '//' + 'dev.xinhulu.com/util/reportErr'
// } else {
// backendalertUrl = 'https:' + '//' + 'www.xiaoyusan.com/util/reportErr'
// }
export default {
errTypeMap: {
resource_fail_error: 'resource_fail_error',
font_fail_error: 'font_fail_error',
unhandledrejection: 'unhandledrejection',
request_fail_error: 'request_fail_error',
cross_domain_error: 'cross_domain_error',
low_speed_error: 'low_speed_error',
timeout_error: 'timeout_error',
manual_error: 'manual_error'
},
//上报频率配置 每 time 的时间之内同一错误只上报 count 次
// 比如 一个script error 在60000ms之内发生了次数超过10次 那么超过部分不上报
reportLimitConfig: {
count: 10,
time: 60000
},
url: 'https://' + location.host + '/muc/util/reportErrV2',
backendalertUrl: 'https://' + location.host + '/muc/util/reportErr'
}