...
|
...
|
@@ -16,9 +16,10 @@ const server = { |
|
|
let msgs = lineparse.parse(data);
|
|
|
|
|
|
for (let m of msgs) {
|
|
|
if (m.measurement === 'web-server-duration') {
|
|
|
let duration = parseInt(m.fields.duration);
|
|
|
|
|
|
if (m.measurement === 'web-server-duration') {
|
|
|
|
|
|
if (duration > config.slowRoute.min && duration < config.slowRoute.max) {
|
|
|
slowRouterSender.addMessage(msg2row.slowRouter(m));
|
|
|
}
|
...
|
...
|
@@ -50,6 +51,20 @@ const server = { |
|
|
});
|
|
|
}
|
|
|
} else if (m.measurement === 'error-report') {
|
|
|
routeSender.addMessage({
|
|
|
measurement: 'error-info',
|
|
|
tags: {
|
|
|
app: m.tags.app,
|
|
|
host: m.tags.hostname,
|
|
|
route: m.tags.route,
|
|
|
code: m.tags.code
|
|
|
},
|
|
|
fields: {
|
|
|
duration: duration,
|
|
|
times: 1
|
|
|
}
|
|
|
});
|
|
|
|
|
|
errorSender.addMessage(msg2row.errorRouter(m));
|
|
|
} else if (m.measurement === 'process-info') {
|
|
|
m.measurement = 'process-info';
|
...
|
...
|
|