saikatharryc / pm2-prometheus-exporter

:rabbit: :rabbit: pm2 prometheus exporter
146 stars 37 forks source link

Fix host and port configuration handling #55

Closed klingac closed 4 years ago

klingac commented 4 years ago

This pull request fixes #54 . Method initModule() is called asynchrounously and when we call server.listen(port, host); vars host and port are undefined. Method initModule() has callback as second param, where we can put server.listen(). Another problem is, that initModule() in @pm2/io package has issue keymetrics/pm2-io-apm#260 that it is not loading module configuration. So i replace @pm2/io for pmx package. Pakcage pmx is deprecated, but is working and is still used by keymetrics in e.g pm2-logrotate module.
Thanks for merging

saikatharryc commented 4 years ago

Thanks for the PR! I will have to look at this more deeply, Change in package might break few things (edge cases) Right now based on some situations I’m not able to review , it will take some time for me.

In between this if some collaborator can review or merge will be great!

saikatharryc commented 4 years ago

Hi @klingac ,i have just now verified. and sorry for the late. it all looks good just that there are few more changes needed. which i will be doing. instead merging this i will do the changes in my end, along with other changes.

Thank you for the time you spent to raise this. once done i will ping in the issue linked. closing it for now.