From b13b1cf1e35239a69a0121eccdf1a8f4992f1702 Mon Sep 17 00:00:00 2001 From: Nikos Angelopoulos Date: Tue, 17 Dec 2024 12:22:23 +0100 Subject: [PATCH] distributor: add electedReplicaPropagationTime native histogram support --- 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 1edb93720b1..3a2452b29ce 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, + NativeHistogramMinResetDuration: time.Hour, + NativeHistogramMaxBucketNumber: 100, }), kvCASCalls: promauto.With(reg).NewCounterVec(prometheus.CounterOpts{ Name: "cortex_ha_tracker_kv_store_cas_total",