CloudNativeJS / appmetrics-prometheus

Module for providing a /metrics endpoint using data from appmetrics for use with Prometheus
Other
63 stars 16 forks source link

Export a method to get prometheus metrics without mounting to /metrics #29

Open raymondfeng opened 5 years ago

raymondfeng commented 5 years ago

I would like to use appmetrics with https://github.com/strongloop/loopback-next/pull/3339. The issue is that we want to control the REST endpoints. It would be nice to have a method from this module to get prometheus metrics without mounting to /metrics.

sam-github commented 4 years ago

@raymondfeng do you want the numeric values, or do you want a function(req, res) ... that you can mount on an express path explicitly?

raymondfeng commented 4 years ago

@sam-github I would prefer to get numeric values or the textual metrics in prometheus formats as we expose more metrics beyond appmetrics.

sam-github commented 4 years ago

That makes sense, and should be not too hard, I will try to find time in the next weeks.