Skip to content

Commit

Permalink
distributor(ha_tracker): add native histogram for electedReplicaPropa…
Browse files Browse the repository at this point in the history
…gationTime (#10264)

* distributor: add native histogram support for electedReplicaPropagationTime

* update changelog

Signed-off-by: Nikos Angelopoulos <[email protected]>

* move changelog entry to unreleased section

---------

Signed-off-by: Nikos Angelopoulos <[email protected]>
  • Loading branch information
NickAnge authored Dec 18, 2024
1 parent 34a24b1 commit cb24dfe
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
* [ENHANCEMENT] Distributor: OTLP receiver now converts also metric metadata. See also https://github.com/prometheus/prometheus/pull/15416. #10168
* [ENHANCEMENT] Distributor: discard float and histogram samples with duplicated timestamps from each timeseries in a request before the request is forwarded to ingesters. Discarded samples are tracked by the `cortex_discarded_samples_total` metrics with reason `sample_duplicate_timestamp`. #10145
* [ENHANCEMENT] Ruler: Add `cortex_prometheus_rule_group_last_rule_duration_sum_seconds` metric to track the total evaluation duration of a rule group regardless of concurrency #10189
* [ENHANCEMENT] Distributor: Add native histogram support for `electedReplicaPropagationTime` metric in ha_tracker. #10264
* [BUGFIX] Distributor: Use a boolean to track changes while merging the ReplicaDesc components, rather than comparing the objects directly. #10185
* [BUGFIX] Querier: fix timeout responding to query-frontend when response size is very close to `-querier.frontend-client.grpc-max-send-msg-size`. #10154
* [BUGFIX] Ruler: fix indeterminate rules being always run concurrently (instead of never) when `-ruler.max-independent-rule-evaluation-concurrency` is set. https://github.com/prometheus/prometheus/pull/15560 #10258
Expand Down
9 changes: 6 additions & 3 deletions pkg/distributor/ha_tracker.go
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit cb24dfe

Please sign in to comment.