Authored by htoooth

fix

... ... @@ -150,9 +150,6 @@ module.exports = (req, res, next) => {
});
if (duration > config.slowRoute.min && duration < config.slowRoute.max) {
logger.info('slow:item =>', JSON.stringify(item));
logger.info('slow:data =>', JSON.stringify(data));
slowRouterSqlSender.addMessage(msg2row.slowRouter(data));
}
}
... ...
... ... @@ -24,7 +24,13 @@ const server = {
let duration = parseInt(m.fields.duration);
if (duration > config.slowRoute.min / 10 && duration < config.slowRoute.max) {
slowRouterSqlSender.addMessage(msg2row.slowRouter(m));
const newData = _.merge({}, m, {
fields: {
duration
}
});
slowRouterSqlSender.addMessage(msg2row.slowRouter(newData));
}
if (m.tags.type.toLowerCase() === 'api') {
... ...