From 5a81ee0297ef33a4f692888231685b56ca8ef3b1 Mon Sep 17 00:00:00 2001 From: Salva Corts Date: Wed, 20 Nov 2024 12:22:16 +0100 Subject: [PATCH] fix registry --- pkg/bloombuild/planner/strategies/chunksize.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pkg/bloombuild/planner/strategies/chunksize.go b/pkg/bloombuild/planner/strategies/chunksize.go index 73ef839609f5e..c2204af72bf84 100644 --- a/pkg/bloombuild/planner/strategies/chunksize.go +++ b/pkg/bloombuild/planner/strategies/chunksize.go @@ -10,6 +10,7 @@ import ( "github.com/go-kit/log" "github.com/go-kit/log/level" "github.com/prometheus/client_golang/prometheus" + "github.com/prometheus/client_golang/prometheus/promauto" "github.com/prometheus/common/model" "github.com/prometheus/prometheus/model/labels" @@ -31,9 +32,9 @@ type ChunkSizeStrategyMetrics struct { tenantTaskSize *prometheus.HistogramVec } -func NewChunkSizeStrategyMetrics(reg prometheus.Registerer) *ChunkSizeStrategyMetrics { +func NewChunkSizeStrategyMetrics(r prometheus.Registerer) *ChunkSizeStrategyMetrics { return &ChunkSizeStrategyMetrics{ - tenantTaskSize: prometheus.NewHistogramVec(prometheus.HistogramOpts{ + tenantTaskSize: promauto.With(r).NewHistogramVec(prometheus.HistogramOpts{ Namespace: metricsNamespace, Subsystem: metricsSubsystem, Name: "tenant_task_size_bytes",