forked from TrueCloudLab/frostfs-node
[#426] Put prometheus behind pkg/metrics
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
This commit is contained in:
parent
3c0e47e6fd
commit
b8e10571c6
19 changed files with 561 additions and 311 deletions
|
@ -5,11 +5,13 @@ import (
|
|||
)
|
||||
|
||||
func initMetrics(c *cfg) {
|
||||
c.metrics = profiler.NewMetrics(c.log, c.viper)
|
||||
if c.metricsCollector != nil {
|
||||
c.metricsServer = profiler.NewMetrics(c.log, c.viper)
|
||||
}
|
||||
}
|
||||
|
||||
func serveMetrics(c *cfg) {
|
||||
if c.metrics != nil {
|
||||
c.metrics.Start(c.ctx)
|
||||
if c.metricsServer != nil {
|
||||
c.metricsServer.Start(c.ctx)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue