-
Notifications
You must be signed in to change notification settings - Fork 35
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
Metrics not being reported by pm2 show x #123
Comments
Hi @camway I think your syntax is ok. But here is the way we used to instantiate metric :
Could you try to launch your app in debug mode and tell us if you see any pmx errors/warnings ? |
@wallet77 Thank you for the quick response. I tried to refactor to your setup, but I get an error I removed the Just in case it comes up, my package.json shows |
Sorry, maybe a too quick answer :) You can use :
|
@wallet77 So I'm still not sure what I'm doing wrong. The only way I've been able to get anything to report to pm2, was by spinning up a new project that did nothing but send trash data to the various trackers. This does tell me though that there has to be something in my project that's causing it not to work, or it wouldn't have worked in the new project. If I figure out what is going wrong, I'll try to post it back on here in case anyone else runs into it |
I feel as though I'm just misusing this package somehow, but I can't figure out what I'm doing wrong.
I've setup 4 different trackers for my app that is run on pm2, but only one of them appears to be reporting any data. 3 of them are meters and 1 of them is a counter. Only 1 of the meters is reporting anything, and I question whether it's correct.
I've tried multiple variations, but this is the current state (obfuscated):
The meters I've also tried passing
agg_type: 'sum'
andtimeframe: 60 * 60 * 60
(as well as several combinations of these and the above)I also considered that the
probe()
function may have to be called before each instance is created, so I tried this refactor:I'm unsure if it matters, but I'm importing the pmx package in a require, and then exporting 4 objects that are each meter/counter instance. Those are then imported in various areas of the project where they are actually incremented/marked.
Is there some kind of pitfall that I'm hitting here? Or is this a bug?
The text was updated successfully, but these errors were encountered: