A complete walkthrough of instrumenting a Node.js service using the popularDocumentation Index
Fetch the complete documentation index at: https://docs.localops.co/llms.txt
Use this file to discover all available pages before exploring further.
prom-client library.
See the overview for the general approach.
1. Add the dependency
2. Register custom metrics and expose /metrics
collectDefaultMetrics enables Node.js runtime metrics (event loop lag, heap size, GC duration, active handles, etc.).
3. Declare the metrics endpoint in ops.json
4. Visualize with a community dashboard
| Dashboard | ID | Notes |
|---|---|---|
| NodeJS Application Dashboard | 11159 | The most widely used dashboard for prom-client — event loop lag, heap, GC, handles, HTTP request rate. |
| NodeJS Applications Dashboard | 19062 | Modern alternative requiring Grafana >= 10.0, supports the full set of prom-client default metrics. |
| NodeJS Applications and Logs Dashboard | 20371 | Combines prom-client metrics with Loki logs for unified observability. |
emails_sent_total, etc.) can be charted alongside.