Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: implement prometheus metrics for base node (#3563)
Description --- - Instrument tari_comms for prometheus metrics - add `metrics` feature to base node and tari_comms - add prometheus metrics scrape server - add prometheus push client - add configuration for metrics `common.metrics` - add `get-network-stats` command - fix bug in value for last request latency Motivation and Context --- Increase base node visibility ![image](https://user-images.githubusercontent.com/1057902/141313369-46060af6-5f27-4ca5-846c-998248996fbd.png) **Dependencies** - `warp` for http metric pull server - `reqwest` for metric push client - `prometheus` for instrumentation How Has This Been Tested? --- Manually - run prometheus ```docker run --rm -it -p 9090:9090 -v `pwd`/prometheus.yml:/etc/prometheus/prometheus.yml prom/prometheus``` - run base node(s) with `--metrics-bind-addr 127.0.0.1:5544` - visit `localhost:9090` ```yaml # prometheus.yml scrape_configs: - job_name: 'node1' scrape_interval: 5s metrics_path: "/metrics" static_configs: - targets: ['host.docker.internal:5544'] labels: node: 'node1' ```
- Loading branch information