forked from TrueCloudLab/frostfs-node
[#680] metrics: Initialize log metrics together with services
Signed-off-by: Anton Nikiforov <an.nikiforov@yadro.com>
This commit is contained in:
parent
bf082348d4
commit
3a997d1207
8 changed files with 58 additions and 38 deletions
|
@ -2,6 +2,7 @@ package metrics
|
|||
|
||||
import (
|
||||
morphmetrics "git.frostfs.info/TrueCloudLab/frostfs-node/pkg/morph/metrics"
|
||||
"git.frostfs.info/TrueCloudLab/frostfs-node/pkg/util/logger"
|
||||
"git.frostfs.info/TrueCloudLab/frostfs-observability/metrics"
|
||||
"github.com/prometheus/client_golang/prometheus"
|
||||
)
|
||||
|
@ -22,6 +23,7 @@ type NodeMetrics struct {
|
|||
policer *policerMetrics
|
||||
morphClient *morphClientMetrics
|
||||
morphCache *morphCacheMetrics
|
||||
log logger.LogMetrics
|
||||
}
|
||||
|
||||
func NewNodeMetrics() *NodeMetrics {
|
||||
|
@ -46,6 +48,7 @@ func NewNodeMetrics() *NodeMetrics {
|
|||
policer: newPolicerMetrics(),
|
||||
morphClient: newMorphClientMetrics(),
|
||||
morphCache: newMorphCacheMetrics(namespace),
|
||||
log: logger.NewLogMetrics(namespace),
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -109,3 +112,7 @@ func (m *NodeMetrics) MorphClientMetrics() morphmetrics.Register {
|
|||
func (m *NodeMetrics) MorphCacheMetrics() MorphCacheMetrics {
|
||||
return m.morphCache
|
||||
}
|
||||
|
||||
func (m *NodeMetrics) LogMetrics() logger.LogMetrics {
|
||||
return m.log
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue