forked from TrueCloudLab/frostfs-node
[#426] cmd/neofs-node: Add metrics collector in node
Disabled by default. Signed-off-by: Alex Vanin <alexey@nspcc.ru>
This commit is contained in:
parent
534ce03421
commit
3c0e47e6fd
4 changed files with 34 additions and 2 deletions
15
cmd/neofs-node/metrics.go
Normal file
15
cmd/neofs-node/metrics.go
Normal file
|
@ -0,0 +1,15 @@
|
|||
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)
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue