Authored by htoooth

fix

... ... @@ -60,7 +60,7 @@ function handleClientError(scope, item) {
},
fields: Object.assign({
message: item.msg,
useragent: scope.app,
useragent: scope.useragent,
stack: item.st ? item.st.replace(/"/g, '') : '',
script: item.sc,
line: _.parseInt(item.ln || 0),
... ... @@ -68,8 +68,11 @@ function handleClientError(scope, item) {
})
});
logger.debug('[client] error info [%s]', JSON.stringify(data));
errorRouterSqlSender.addMessage(msg2row.errorRouter(data));
const ipInfo = ipService.getIsp(scope.ip);
const row = Object.assign(msg2row.errorRouter(data), ipInfo, {ip: scope.ip});
logger.debug('[client] error info [%s]', JSON.stringify(row));
errorRouterSqlSender.addMessage(row);
}
function handleClientFirst(scope, item) {
... ...
... ... @@ -13,3 +13,12 @@ ON COMPLETION PRESERVE DISABLE
DO CALL p_del_perf (3);
alter event e_del_perf_report on completion preserve enable;
ALTER TABLE error_report ADD ip varchar(15);
ALTER TABLE error_report ADD country varchar(15);
ALTER TABLE error_report ADD region varchar(20);
ALTER TABLE error_report ADD city varchar(20);
ALTER TABLE error_report ADD isp varchar(20);
\ No newline at end of file
... ...