From 01fe564e464d3800cee2625ff99e051b84547926 Mon Sep 17 00:00:00 2001 From: Jacek Sieka Date: Fri, 19 Mar 2021 10:36:38 +0100 Subject: [PATCH] chronos-based metrics (#2432) This opens up the road for removing `-d:insecure` for metrics. --- beacon_chain/nimbus_beacon_node.nim | 5 +++-- vendor/nim-chronos | 2 +- vendor/nim-metrics | 2 +- vendor/nim-stew | 2 +- 4 files changed, 6 insertions(+), 5 deletions(-) diff --git a/beacon_chain/nimbus_beacon_node.nim b/beacon_chain/nimbus_beacon_node.nim index c00ec9321..2fd057316 100644 --- a/beacon_chain/nimbus_beacon_node.nim +++ b/beacon_chain/nimbus_beacon_node.nim @@ -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" diff --git a/vendor/nim-chronos b/vendor/nim-chronos index 03707426e..c8eefb938 160000 --- a/vendor/nim-chronos +++ b/vendor/nim-chronos @@ -1 +1 @@ -Subproject commit 03707426e43d03cccc1de2e7284de168b79f7bf6 +Subproject commit c8eefb9382a786993fc703386b0bd446ecf9c037 diff --git a/vendor/nim-metrics b/vendor/nim-metrics index 22a386734..105af2bfb 160000 --- a/vendor/nim-metrics +++ b/vendor/nim-metrics @@ -1 +1 @@ -Subproject commit 22a3867341f7b0a9d55661b41d7ee5febe35c86b +Subproject commit 105af2bfbd4896e8b4086d3dff1e6c187e9d0a41 diff --git a/vendor/nim-stew b/vendor/nim-stew index 42475fd2f..6bcb21184 160000 --- a/vendor/nim-stew +++ b/vendor/nim-stew @@ -1 +1 @@ -Subproject commit 42475fd2f1919acd11be2fdc75fd6e2cefc99e90 +Subproject commit 6bcb21184aeb96ce6c62e187a64d678b74609f1e