[#1154] ir: Add info metric

Signed-off-by: Alexander Chuprov <a.chuprov@yadro.com>
This commit is contained in:
Alexander Chuprov 2024-06-26 14:47:16 +03:00 committed by Evgenii Stratonikov
parent 87a4a6e8d0
commit 452faa3c89

View file

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