Add metrics to VC (#1954)

## Issue Addressed

NA

## Proposed Changes

- Adds a HTTP server to the VC which provides Prometheus metrics.
- Moves the health metrics into the `lighthouse_metrics` crate so it can be shared between BN/VC.
- Sprinkle some metrics around the VC.
- Update the book to indicate that we now have VC metrics.
- Shifts the "waiting for genesis" logic later in the `ProductionValidatorClient::new_from_cli`
  - This is worth attention during the review.

## Additional Info

- ~~`clippy` has some new lints that are failing. I'll deal with that in another PR.~~
This commit is contained in:
Paul Hauner
2020-11-26 01:10:51 +00:00
parent 50558e61f7
commit 26741944b1
18 changed files with 571 additions and 73 deletions

4
Cargo.lock generated
View File

@@ -7382,8 +7382,10 @@ dependencies = [
"futures 0.3.8",
"hex",
"hyper 0.13.9",
"lazy_static",
"libc",
"libsecp256k1",
"lighthouse_metrics",
"lighthouse_version",
"logging",
"parking_lot 0.11.1",
@@ -7535,6 +7537,8 @@ dependencies = [
"beacon_chain",
"eth2",
"headers",
"lazy_static",
"lighthouse_metrics",
"safe_arith",
"serde",
"state_processing",