← Back to Node.js performance mapmetrics
📡
Node.js Performance
Prometheus Metrics
Expose process, RED, and custom metrics from Node.
Detailed Description
Prometheus metrics are numeric time-series data. In Node, prom-client can expose default process metrics plus custom counters, gauges, summaries, and histograms.
Use histograms for latency, counters for totals, and gauges for current values such as queue depth or active connections. Keep label cardinality low to protect Prometheus.
Mental Model
/metrics -> scrape -> Prometheus -> Grafana dashboard
When To Use
- ->Build production dashboards
- ->Alert on latency and error rates
- ->Track Node process health over time
Tools: prom-client, default metrics, histograms
prom-client.js
Live Editor
Loading...
Output
Run code to see output...