Skip to content

Commit

Permalink
Merge pull request #17216 from vbotbuildovich/backport-pr-16842-v23.3…
Browse files Browse the repository at this point in the history
….x-285

[v23.3.x] raft/recovery: better metric for recovery bandwidth consumption
  • Loading branch information
bharathv authored Mar 26, 2024
2 parents 02bd8b5 + 7e403a0 commit face89c
Showing 1 changed file with 16 additions and 5 deletions.
21 changes: 16 additions & 5 deletions src/v/raft/coordinated_recovery_throttle.cc
Original file line number Diff line number Diff line change
Expand Up @@ -91,11 +91,22 @@ void coordinated_recovery_throttle::setup_metrics() {
namespace sm = ss::metrics;
_public_metrics.add_group(
prometheus_sanitize::metrics_name("raft:recovery"),
{sm::make_gauge(
"partition_movement_available_bandwidth",
[this] { return _throttler.available(); },
sm::description(
"Bandwidth available for partition movement. bytes/sec"))});
{// note: deprecate partition_movement_available_bandwidth
// in favor of partition_movement_consumed_bandwidth when
// possible.
sm::make_gauge(
"partition_movement_available_bandwidth",
[this] { return _throttler.available(); },
sm::description(
"Bandwidth available for partition movement. bytes/sec")),
sm::make_gauge(
"partition_movement_consumed_bandwidth",
[this] {
return _throttler.last_reset_capacity()
- _throttler.available();
},
sm::description(
"Bandwidth consumed for partition movement. bytes/sec"))});
}
}

Expand Down

0 comments on commit face89c

Please sign in to comment.