Skip to content Skip to sidebar Skip to footer

How To Call Prometheus Histogram.observe() On Serveral Functions At Once In Nodejs

I am monitoring a NodeJS app using Prometheus. Creating a Histogram like this const histogram = new client.Histogram({ name: 'node_request_duration_seconds', help: 'Histogr

Solution 1:

Possible solutions :

  1. Refer Express Prom Bundle library to measure metrics automatically across different paths. https://github.com/jochen-schweizer/express-prom-bundle

  2. Use onFinished callback to call Histogram.Observe() after the request processing is done https://github.com/jshttp/on-finished

Post a Comment for "How To Call Prometheus Histogram.observe() On Serveral Functions At Once In Nodejs"