frostfs-node/cmd/neofs-node/metrics.go
Alex Vanin 3c0e47e6fd [#426] cmd/neofs-node: Add metrics collector in node
Disabled by default.

Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2021-03-17 10:58:00 +03:00

15 lines
239 B
Go

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