{"library":"prometheus-middleware","type":"library","category":null,"description":"The `prometheus-middleware` package provides a straightforward solution for integrating Prometheus metrics into Node.js HTTP applications. Currently at version 1.4.2, it appears to maintain an active development cadence given its continuous integration setup and recent releases. It acts as an abstraction layer, setting up an HTTP server to expose metrics, instantiating and exposing a `prom-client` instance, and patching the native Node.js HTTP server to automatically track request-response times. A key differentiator is its out-of-the-box support for popular Node.js HTTP frameworks like Express and Fastify, along with the default Node.js HTTP server. It also includes sensible defaults, such as normalizing 404 error paths to prevent high cardinality issues in Prometheus, and automatically collects metrics for event loop, garbage collection, CPU, and memory usage. Developers can also easily define custom metrics using the underlying `prom-client` instance.","language":"javascript","status":"active","version":"1.4.2","tags":["javascript","apm","prometheus","middleware","latency","handles","eventloop","gc","cpu","typescript"],"install":[{"cmd":"npm install prometheus-middleware","imports":["import APM from 'prometheus-middleware';\n// Or for the class itself:\nimport { APM } from 'prometheus-middleware';","const APM = require('prometheus-middleware');","import APM from 'prometheus-middleware';\nconst apm = new APM();\nconst counter = new apm.client.Counter({\n  name: 'my_counter',\n  help: 'A custom counter metric'\n});"]},{"cmd":"yarn add prometheus-middleware","imports":[]},{"cmd":"pnpm add prometheus-middleware","imports":[]}],"homepage":null,"github":"https://github.com/VoodooTeam/prometheus-middleware","docs":null,"changelog":null,"pypi":null,"npm":"https://www.npmjs.com/package/prometheus-middleware","openapi_spec":null,"status_page":null,"smithery":null,"compatibility":{"summary":{"python_range":"18–22","success_rate":0,"avg_install_s":null,"avg_import_s":null,"wheel_type":null},"url":"https://checklist.day/v1/registry/prometheus-middleware/compatibility"},"provenance":{"verified_status":null,"verified_at":null,"last_verified":"Wed Jun 17","next_check":"Wed Jul 22","install_tag":null}}