1.0.3 • Published 4 years ago
nwr-monitoring v1.0.3
NWR Monitoring
A monitoring module for use on NWR node applications. This module exposes a /metrics
endpoint and defines custom metrics for Prometheus
Usage
Initialize the application with Prometheus Client bu calling init
and passing in the application instance and the metrics key prefix. This is usually the name of the application being monitored.
const { init } = require('nwr-monitoring')
init(app, '<CUSTOM_STRING>');
That is it. Visit your application's <APP_ROUTE>/metrics
to see the Prometheus Exposition format read out of the metrics.