Skip to content

Latest commit

 

History

History
34 lines (27 loc) · 2.09 KB

metrics.md

File metadata and controls

34 lines (27 loc) · 2.09 KB

Metrics

When a service is running 24/7 and has been stable for weeks, no one every looks at the log files unless it crashes. However, for continuous monitoring and alerting, exposing a set of metrics from the binary can be very useful. These metrics can then be fed into a dashboard like Grafana and then be connected to an alerting software like Pager Duty via a plugin, to easily provide notifications on critical situations, like running low on funds or unusually high errors relaying packets of submitting client updates.

Tendermint uses Prometheus to produce relevant metrics. Since Prometheus is Go-centric, we must find an equivalent library for TypeScript. This task is to produce the data. Actually hooking it up to a dashboard is left as a DevOps task for each team deploying the relayer.

TODO: select library to use:

Prometheus metric collection (or similar):

  • prom-client - The official prometheus client for Node.js. All js, but there is an index.d.ts
  • promts - A native TypeScript implementation of a Prometheus client. Seems quite a young project to depend on.
  • appmetrics - Provides a lot of Node.js and DB related metrics. It seems to allow custom events, but only seems to plug into their Dashboard
  • prometheus-api-metrics seems like a more mature (v3.1.0) but less actively developed version of promts. It seems designed for express and koa apps, but may be able to be used more generally.

OpenTracing libraries (for debugging distributed systems, likely overkill here):