Counters and a Prometheus-format exporter for one instance.
Turn it on with metrics: true (or PUSHER_METRICS=true) and scrape
GET /metrics. Set :metrics_token (PUSHER_METRICS_TOKEN) to require an
Authorization: Bearer <token> header. Without a token the endpoint is
open to anyone who can reach the port, so block /metrics at your proxy.
Counters are per node and reset when the node restarts, which is what
Prometheus expects (rate() handles resets). With several nodes, scrape
each one.
Summary
Functions
Current value of a counter.
Adds n to a counter. A no-op when the instance has no counters (e.g. in unit tests).
Renders every counter and gauge in the Prometheus text exposition format.