mirror of
https://github.com/status-im/nimbus-eth2.git
synced 2025-02-22 11:18:25 +00:00
start metrics server later in sequence, after BN is initialized (#6902)
This commit is contained in:
parent
d98f91b298
commit
c673fbe418
@ -2377,13 +2377,6 @@ proc doRunBeaconNode(config: var BeaconNodeConf, rng: ref HmacDrbgContext) {.rai
|
||||
|
||||
config.createDumpDirs()
|
||||
|
||||
let metricsServer = (waitFor config.initMetricsServer()).valueOr:
|
||||
return
|
||||
|
||||
# Nim GC metrics (for the main thread) will be collected in onSecond(), but
|
||||
# we disable piggy-backing on other metrics here.
|
||||
setSystemMetricsAutomaticUpdate(false)
|
||||
|
||||
# There are no managed event loops in here, to do a graceful shutdown, but
|
||||
# letting the default Ctrl+C handler exit is safe, since we only read from
|
||||
# the db.
|
||||
@ -2426,6 +2419,13 @@ proc doRunBeaconNode(config: var BeaconNodeConf, rng: ref HmacDrbgContext) {.rai
|
||||
|
||||
let node = waitFor BeaconNode.init(rng, config, metadata)
|
||||
|
||||
let metricsServer = (waitFor config.initMetricsServer()).valueOr:
|
||||
return
|
||||
|
||||
# Nim GC metrics (for the main thread) will be collected in onSecond(), but
|
||||
# we disable piggy-backing on other metrics here.
|
||||
setSystemMetricsAutomaticUpdate(false)
|
||||
|
||||
node.metricsServer = metricsServer
|
||||
|
||||
if bnStatus == BeaconNodeStatus.Stopping:
|
||||
|
Loading…
x
Reference in New Issue
Block a user