From ab41ce4d10639c870ba79194fa51044b35f4a277 Mon Sep 17 00:00:00 2001 From: Nikos Angelopoulos Date: Tue, 17 Dec 2024 12:37:28 +0100 Subject: [PATCH] distributor: add native histogram support for electedReplicaPropagationTime --- pkg/distributor/ha_tracker.go | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/pkg/distributor/ha_tracker.go b/pkg/distributor/ha_tracker.go index 1edb93720b..eaa90b500b 100644 --- a/pkg/distributor/ha_tracker.go +++ b/pkg/distributor/ha_tracker.go @@ -253,9 +253,12 @@ func newHaTracker(cfg HATrackerConfig, limits haTrackerLimits, reg prometheus.Re Help: "The total number of reelections for a user ID/cluster, from the KVStore.", }, []string{"user", "cluster"}), electedReplicaPropagationTime: promauto.With(reg).NewHistogram(prometheus.HistogramOpts{ - Name: "cortex_ha_tracker_elected_replica_change_propagation_time_seconds", - Help: "The time it for the distributor to update the replica change.", - Buckets: prometheus.DefBuckets, + Name: "cortex_ha_tracker_elected_replica_change_propagation_time_seconds", + Help: "The time it for the distributor to update the replica change.", + Buckets: prometheus.DefBuckets, + NativeHistogramBucketFactor: 1.1, + NativeHistogramMaxBucketNumber: 100, + NativeHistogramMinResetDuration: time.Hour, }), kvCASCalls: promauto.With(reg).NewCounterVec(prometheus.CounterOpts{ Name: "cortex_ha_tracker_kv_store_cas_total",