Showing
2 changed files
with
7 additions
and
4 deletions
@@ -150,9 +150,6 @@ module.exports = (req, res, next) => { | @@ -150,9 +150,6 @@ module.exports = (req, res, next) => { | ||
150 | }); | 150 | }); |
151 | 151 | ||
152 | if (duration > config.slowRoute.min && duration < config.slowRoute.max) { | 152 | if (duration > config.slowRoute.min && duration < config.slowRoute.max) { |
153 | - logger.info('slow:item =>', JSON.stringify(item)); | ||
154 | - logger.info('slow:data =>', JSON.stringify(data)); | ||
155 | - | ||
156 | slowRouterSqlSender.addMessage(msg2row.slowRouter(data)); | 153 | slowRouterSqlSender.addMessage(msg2row.slowRouter(data)); |
157 | } | 154 | } |
158 | } | 155 | } |
@@ -24,7 +24,13 @@ const server = { | @@ -24,7 +24,13 @@ const server = { | ||
24 | let duration = parseInt(m.fields.duration); | 24 | let duration = parseInt(m.fields.duration); |
25 | 25 | ||
26 | if (duration > config.slowRoute.min / 10 && duration < config.slowRoute.max) { | 26 | if (duration > config.slowRoute.min / 10 && duration < config.slowRoute.max) { |
27 | - slowRouterSqlSender.addMessage(msg2row.slowRouter(m)); | 27 | + const newData = _.merge({}, m, { |
28 | + fields: { | ||
29 | + duration | ||
30 | + } | ||
31 | + }); | ||
32 | + | ||
33 | + slowRouterSqlSender.addMessage(msg2row.slowRouter(newData)); | ||
28 | } | 34 | } |
29 | 35 | ||
30 | if (m.tags.type.toLowerCase() === 'api') { | 36 | if (m.tags.type.toLowerCase() === 'api') { |
-
Please register or login to post a comment