appmetrics icon indicating copy to clipboard operation
appmetrics copied to clipboard

'http' event triggered twice

Open yuecchen opened this issue 6 years ago • 0 comments
trafficstars

here is our code to using appmetrics:

var appmetrics = require('appmetrics');
var monitor = appmetrics.monitor();
monitor.on('http', function(data){console.info(data.time, data.duration, data.url, data.statusCode)});

I triggered request manually, and each trigger will generate two exactly same request:

[root@joycevm1 server]# node server-test.js
[Mon Sep 16 22:52:50 2019] com.ibm.diagnostics.healthcenter.loader INFO: Node Application Metrics 5.0.3.201908020747 (Agent Core 4.0.3)
[Mon Sep 16 22:52:50 2019] com.ibm.diagnostics.healthcenter.mqtt INFO: Connecting to broker localhost:1883
Web server listening at: http://0.0.0.0:3001
1568699579362 32.80413 /api/pets/1 304
1568699579362 32.80413 /api/pets/1 304
1568699624992 6.686025 /api/pets/1 304
1568699624992 6.686025 /api/pets/1 304

it would happen when I do /api/pets or /api/pets/xxx request, only one event is trigger when I use /

a sample application will is uploaded: pets.zip

yuecchen avatar Sep 17 '19 06:09 yuecchen