Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[v23.3.x] raft/recovery: better metric for recovery bandwidth consumption #17216

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading