UNIwise / socket.io-prometheus-metrics

Socket.IO prometheus metrics exporter written in typescript
Apache License 2.0
36 stars 17 forks source link

Integrating with another prom-client #11

Closed DataTables closed 3 years ago

DataTables commented 3 years ago

The documentation notes how you can get the metrics to serve them up using ioMetrics.register.metrics(); which is really useful - but is it possible to use those metrics with another prom-client (specifically express-prom-bundle in this case, but I think it applies in general), or would I need another end point with Prometheus scraping two routes from my app (http and socket metrics)?

naueramant commented 3 years ago

Well that really depends on what express-prom-bundle can do. The metrics() really just returns the plain metrics which can then be served as you please.

The easy solution would be to just serve two metric endpoints. If you really want to combine them i think you might have to manually merge the express metrics with the socket io metrics?

I might look into making the register configurable in v2.