diff --git a/pkg/block/indexheader/lazy_binary_reader.go b/pkg/block/indexheader/lazy_binary_reader.go index 649dccc46a4..e2aa9357d3a 100644 --- a/pkg/block/indexheader/lazy_binary_reader.go +++ b/pkg/block/indexheader/lazy_binary_reader.go @@ -33,23 +33,23 @@ type LazyBinaryReaderMetrics struct { func NewLazyBinaryReaderMetrics(reg prometheus.Registerer) *LazyBinaryReaderMetrics { return &LazyBinaryReaderMetrics{ loadCount: promauto.With(reg).NewCounter(prometheus.CounterOpts{ - Name: "binary_reader_lazy_load_total", + Name: "indexheader_lazy_load_total", Help: "Total number of index-header lazy load operations.", }), loadFailedCount: promauto.With(reg).NewCounter(prometheus.CounterOpts{ - Name: "binary_reader_lazy_load_failed_total", + Name: "indexheader_lazy_load_failed_total", Help: "Total number of failed index-header lazy load operations.", }), unloadCount: promauto.With(reg).NewCounter(prometheus.CounterOpts{ - Name: "binary_reader_lazy_unload_total", + Name: "indexheader_lazy_unload_total", Help: "Total number of index-header lazy unload operations.", }), unloadFailedCount: promauto.With(reg).NewCounter(prometheus.CounterOpts{ - Name: "binary_reader_lazy_unload_failed_total", + Name: "indexheader_lazy_unload_failed_total", Help: "Total number of failed index-header lazy unload operations.", }), loadDuration: promauto.With(reg).NewHistogram(prometheus.HistogramOpts{ - Name: "binary_reader_lazy_load_duration_seconds", + Name: "indexheader_lazy_load_duration_seconds", Help: "Duration of the index-header lazy loading in seconds.", Buckets: []float64{0.01, 0.02, 0.05, 0.1, 0.2, 0.5, 1, 2, 5}, }), diff --git a/pkg/block/indexheader/reader_pool.go b/pkg/block/indexheader/reader_pool.go index 6e6c8812931..35d7437f9b8 100644 --- a/pkg/block/indexheader/reader_pool.go +++ b/pkg/block/indexheader/reader_pool.go @@ -15,7 +15,6 @@ import ( "github.com/prometheus/prometheus/tsdb/index" "go.uber.org/atomic" - "github.com/thanos-io/thanos/pkg/extprom" "github.com/thanos-io/thanos/pkg/objstore" ) @@ -38,7 +37,7 @@ func NewReaderPool(logger log.Logger, lazyReaderEnabled bool, lazyReaderIdleTime logger: logger, lazyReaderEnabled: lazyReaderEnabled, lazyReaderIdleTimeout: lazyReaderIdleTimeout, - lazyReaderMetrics: NewLazyBinaryReaderMetrics(extprom.WrapRegistererWithPrefix("indexheader_pool_", reg)), + lazyReaderMetrics: NewLazyBinaryReaderMetrics(reg), readers: make(map[*readerTracker]struct{}), close: make(chan struct{}), }