frostfs-node/cmd/neofs-node/metrics.go
Alex Vanin b8e10571c6 [#426] Put prometheus behind pkg/metrics
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2021-03-17 10:58:00 +03:00

17 lines
293 B
Go

package main
import (
"github.com/nspcc-dev/neofs-node/pkg/util/profiler"
)
func initMetrics(c *cfg) {
if c.metricsCollector != nil {
c.metricsServer = profiler.NewMetrics(c.log, c.viper)
}
}
func serveMetrics(c *cfg) {
if c.metricsServer != nil {
c.metricsServer.Start(c.ctx)
}
}