[#1154] ir: Add info metric
All checks were successful
DCO action / DCO (pull_request) Successful in 1m39s
Vulncheck / Vulncheck (pull_request) Successful in 5m28s
Tests and linters / Lint (pull_request) Successful in 8m6s
Tests and linters / gopls check (pull_request) Successful in 8m1s
Build / Build Components (1.22) (pull_request) Successful in 7m49s
Build / Build Components (1.21) (pull_request) Successful in 8m46s
Tests and linters / Staticcheck (pull_request) Successful in 10m58s
Pre-commit hooks / Pre-commit (pull_request) Successful in 20m10s
Tests and linters / Tests (1.22) (pull_request) Successful in 9m9s
Tests and linters / Tests (1.21) (pull_request) Successful in 9m37s
Tests and linters / Tests with -race (pull_request) Successful in 9m45s

Signed-off-by: Alexander Chuprov <a.chuprov@yadro.com>
This commit is contained in:
Alexander Chuprov 2024-06-26 14:47:16 +03:00
parent 406272d52d
commit 8df4a58fda

View file

@ -4,6 +4,7 @@ import (
"strconv"
"time"
"git.frostfs.info/TrueCloudLab/frostfs-node/misc"
"git.frostfs.info/TrueCloudLab/frostfs-node/pkg/util/logger"
"git.frostfs.info/TrueCloudLab/frostfs-observability/metrics"
"github.com/prometheus/client_golang/prometheus"
@ -16,6 +17,7 @@ type InnerRingServiceMetrics struct {
eventDuration *prometheus.HistogramVec
morphCacheMetrics *morphCacheMetrics
logMetrics logger.LogMetrics
appInfo *ApplicationInfo
}
// NewInnerRingMetrics returns new instance of metrics collectors for inner ring.
@ -46,6 +48,7 @@ func NewInnerRingMetrics() *InnerRingServiceMetrics {
health: health,
eventDuration: eventDuration,
morphCacheMetrics: newMorphCacheMetrics(innerRingNamespace),
appInfo: NewApplicationInfo(misc.Version),
logMetrics: logger.NewLogMetrics(innerRingNamespace),
}
}