Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

'http' event triggered twice #611

Open
yuecchen opened this issue Sep 17, 2019 · 0 comments
Open

'http' event triggered twice #611

yuecchen opened this issue Sep 17, 2019 · 0 comments

Comments

@yuecchen
Copy link
Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant