[#764] metrics: Fix epoch metric
All checks were successful
DCO action / DCO (pull_request) Successful in 4m53s
Vulncheck / Vulncheck (pull_request) Successful in 4m51s
Build / Build Components (1.21) (pull_request) Successful in 6m39s
Build / Build Components (1.20) (pull_request) Successful in 7m18s
Tests and linters / Tests (1.20) (pull_request) Successful in 8m27s
Tests and linters / Tests with -race (pull_request) Successful in 8m24s
Tests and linters / Tests (1.21) (pull_request) Successful in 8m48s
Tests and linters / Staticcheck (pull_request) Successful in 8m44s
Tests and linters / Lint (pull_request) Successful in 9m58s

Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
This commit is contained in:
Dmitrii Stepanov 2023-10-31 15:57:06 +03:00
parent c80b46fad3
commit 616aafc494

View file

@ -562,10 +562,11 @@ func initCfg(appCfg *config.Config) *cfg {
relayOnly := nodeconfig.Relay(appCfg) relayOnly := nodeconfig.Relay(appCfg)
netState := newNetworkState() netState := newNetworkState()
netState.metrics = c.metricsCollector
c.shared = initShared(appCfg, key, netState, relayOnly) c.shared = initShared(appCfg, key, netState, relayOnly)
netState.metrics = c.metricsCollector
logPrm, err := c.loggerPrm() logPrm, err := c.loggerPrm()
fatalOnErr(err) fatalOnErr(err)
logPrm.SamplingHook = c.metricsCollector.LogMetrics().GetSamplingHook() logPrm.SamplingHook = c.metricsCollector.LogMetrics().GetSamplingHook()