{"repo":"jochen-schweizer/express-prom-bundle","free":true,"listed":false,"github":"https://github.com/jochen-schweizer/express-prom-bundle","clone":"git clone https://github.com/jochen-schweizer/express-prom-bundle.git","description":"express middleware with standard prometheus metrics in one bundle","language":"JavaScript","stars":323,"topics":["npm-package","express-middleware","metrics"],"license":"MIT","category":"analytics","readme_excerpt":"express prometheus bundle Express middleware with popular prometheus metrics in one bundle. It's also compatible with koa v1 and v2 (see below). This library uses prom-client v15+ as a peer dependency. See: https://github.com/siimon/prom-client If you need a support for older versions of prom-client (v12-v14), downgrade to express-prom-bundle v6.6.0 Included metrics: up : normally is just 1 http request duration seconds : http latency histogram/summary labeled with status code , method and path Install Sample Usage call your endpoints see your metrics here: http://localhost:3000/metrics ALERT! The order in which the routes are registered is important, since only the routes registered after the express-prom-bundle will be measured You can use this to your advantage to bypass some of the routes. See the example below. Options Which labels to include in http request duration seconds metric: includeStatusCode : HTTP status code (200, 400, 404 etc.), default: true includeMethod : HTTP method (GET, PUT, ...), default: false includePath : URL path (see important details below), default: false customLabels : an object containing extra labels, e.g. . Most useful together with transformLabels callback, otherwise it's better to use native Prometheus relabeling. includeUp : include an auxiliary \"up\"-metric which always returns 1, default: true metricsPath : replace the /metrics route with a regex or exact string . Note: it is highly recommended to just stick to the default metricType : h","default_branch":null,"files":null,"tree":[],"storefront":"/r/jochen-schweizer","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/jochen-schweizer/express-prom-bundle/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}