[#680] metrics: Initialize log metrics together with services
All checks were successful
DCO action / DCO (pull_request) Successful in 3m31s
Vulncheck / Vulncheck (pull_request) Successful in 3m17s
Build / Build Components (1.21) (pull_request) Successful in 3m56s
Tests and linters / Staticcheck (pull_request) Successful in 5m13s
Tests and linters / Lint (pull_request) Successful in 5m50s
Tests and linters / Tests (1.20) (pull_request) Successful in 7m31s
Build / Build Components (1.20) (pull_request) Successful in 7m44s
Tests and linters / Tests (1.21) (pull_request) Successful in 7m32s
Tests and linters / Tests with -race (pull_request) Successful in 7m33s
All checks were successful
DCO action / DCO (pull_request) Successful in 3m31s
Vulncheck / Vulncheck (pull_request) Successful in 3m17s
Build / Build Components (1.21) (pull_request) Successful in 3m56s
Tests and linters / Staticcheck (pull_request) Successful in 5m13s
Tests and linters / Lint (pull_request) Successful in 5m50s
Tests and linters / Tests (1.20) (pull_request) Successful in 7m31s
Build / Build Components (1.20) (pull_request) Successful in 7m44s
Tests and linters / Tests (1.21) (pull_request) Successful in 7m32s
Tests and linters / Tests with -race (pull_request) Successful in 7m33s
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
|
@ -4,6 +4,7 @@ import (
|
|||
"strconv"
|
||||
"time"
|
||||
|
||||
"git.frostfs.info/TrueCloudLab/frostfs-node/pkg/util/logger"
|
||||
"git.frostfs.info/TrueCloudLab/frostfs-observability/metrics"
|
||||
"github.com/prometheus/client_golang/prometheus"
|
||||
)
|
||||
|
@ -14,6 +15,7 @@ type InnerRingServiceMetrics struct {
|
|||
health prometheus.Gauge
|
||||
eventDuration *prometheus.HistogramVec
|
||||
morphCacheMetrics *morphCacheMetrics
|
||||
logMetrics logger.LogMetrics
|
||||
}
|
||||
|
||||
// NewInnerRingMetrics returns new instance of metrics collectors for inner ring.
|
||||
|
@ -44,6 +46,7 @@ func NewInnerRingMetrics() *InnerRingServiceMetrics {
|
|||
health: health,
|
||||
eventDuration: eventDuration,
|
||||
morphCacheMetrics: newMorphCacheMetrics(innerRingNamespace),
|
||||
logMetrics: logger.NewLogMetrics(innerRingNamespace),
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -67,3 +70,7 @@ func (m *InnerRingServiceMetrics) AddEvent(d time.Duration, typ string, success
|
|||
func (m *InnerRingServiceMetrics) MorphCacheMetrics() MorphCacheMetrics {
|
||||
return m.morphCacheMetrics
|
||||
}
|
||||
|
||||
func (m *InnerRingServiceMetrics) LogMetrics() logger.LogMetrics {
|
||||
return m.logMetrics
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue