Package Exports
- express-prom-bundle
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (express-prom-bundle) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
express prometheus bundle
express middleware with popular prometheus metrics in one bundle.
Internally it uses prom-client. See: https://github.com/siimon/prom-client
Included metrics:
up: normally is just 1nodejs_memory_heap_total_bytesandnodejs_memory_heap_used_byteshttp_request_total: count of http requests labeled with status_code
Install
npm install express-prom-bundleUsage
const
promBundle = require("express-prom-bundle"),
middleware = promBundle({/* options */ });Options
- prefix: prefix added to every metric name
Example
"use strict";
const express = require("express"),
app = express(),
promBundle = require(".");
app.use(promBundle({
prefix: "demo_app:something"
}));
app.get("/hello", (req, res) => res.send("ok"));
app.listen(3000);