chronos-based metrics (#2432)

This opens up the road for removing `-d:insecure` for metrics.
This commit is contained in:
Jacek Sieka 2021-03-19 10:36:38 +01:00 committed by GitHub
parent 97850741a0
commit 01fe564e46
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 6 additions and 5 deletions

View File

@ -13,7 +13,8 @@ import
# Nimble packages
stew/[objects, byteutils, endians2, io2], stew/shims/macros,
chronos, confutils, metrics, json_rpc/[rpcclient, rpcserver, jsonmarshal],
chronos, confutils, metrics, metrics/chronos_httpserver,
json_rpc/[rpcclient, rpcserver, jsonmarshal],
chronicles, bearssl, blscurve,
json_serialization/std/[options, sets, net], serialization/errors,
@ -1637,7 +1638,7 @@ proc doRunBeaconNode(config: var BeaconNodeConf, rng: ref BrHmacDrbgContext) =
let metricsAddress = config.metricsAddress
notice "Starting metrics HTTP server",
url = "http://" & $metricsAddress & ":" & $config.metricsPort & "/metrics"
metrics.startHttpServer($metricsAddress, config.metricsPort)
startMetricsHttpServer($metricsAddress, config.metricsPort)
else:
warn "Metrics support disabled, see https://status-im.github.io/nimbus-eth2/metrics-pretty-pictures.html#simple-metrics"

2
vendor/nim-chronos vendored

@ -1 +1 @@
Subproject commit 03707426e43d03cccc1de2e7284de168b79f7bf6
Subproject commit c8eefb9382a786993fc703386b0bd446ecf9c037

2
vendor/nim-metrics vendored

@ -1 +1 @@
Subproject commit 22a3867341f7b0a9d55661b41d7ee5febe35c86b
Subproject commit 105af2bfbd4896e8b4086d3dff1e6c187e9d0a41

2
vendor/nim-stew vendored

@ -1 +1 @@
Subproject commit 42475fd2f1919acd11be2fdc75fd6e2cefc99e90
Subproject commit 6bcb21184aeb96ce6c62e187a64d678b74609f1e