Skip to content

Enable smp_message_queue metrics by default #2507

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
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
2 changes: 0 additions & 2 deletions include/seastar/core/metrics.hh
Original file line number Diff line number Diff line change
Expand Up @@ -423,8 +423,6 @@ metric_function make_function(T& val, data_type dt) {
}
}

extern const bool metric_disabled;

extern label shard_label;

/*
Expand Down
2 changes: 0 additions & 2 deletions src/core/metrics.cc
Original file line number Diff line number Diff line change
Expand Up @@ -544,8 +544,6 @@ void impl::set_metric_family_configs(const std::vector<metric_family_config>& fa
}
}

const bool metric_disabled = false;

relabel_config::relabel_action relabel_config_action(const std::string& action) {
if (action == "skip_when_empty") {
return relabel_config::relabel_action::skip_when_empty;
Expand Down
14 changes: 7 additions & 7 deletions src/core/reactor.cc
Original file line number Diff line number Diff line change
Expand Up @@ -3646,16 +3646,16 @@ void smp_message_queue::start(unsigned cpuid) {
_metrics.add_group("smp", {
// queue_length value:GAUGE:0:U
// Absolute value of num packets in last tx batch.
sm::make_queue_length("send_batch_queue_length", _last_snt_batch, sm::description("Current send batch queue length"), {sm::shard_label(instance)})(sm::metric_disabled),
sm::make_queue_length("receive_batch_queue_length", _last_rcv_batch, sm::description("Current receive batch queue length"), {sm::shard_label(instance)})(sm::metric_disabled),
sm::make_queue_length("complete_batch_queue_length", _last_cmpl_batch, sm::description("Current complete batch queue length"), {sm::shard_label(instance)})(sm::metric_disabled),
sm::make_queue_length("send_queue_length", _current_queue_length, sm::description("Current send queue length"), {sm::shard_label(instance)})(sm::metric_disabled),
sm::make_queue_length("send_batch_queue_length", _last_snt_batch, sm::description("Current send batch queue length"), {sm::shard_label(instance)}),
sm::make_queue_length("receive_batch_queue_length", _last_rcv_batch, sm::description("Current receive batch queue length"), {sm::shard_label(instance)}),
sm::make_queue_length("complete_batch_queue_length", _last_cmpl_batch, sm::description("Current complete batch queue length"), {sm::shard_label(instance)}),
sm::make_queue_length("send_queue_length", _current_queue_length, sm::description("Current send queue length"), {sm::shard_label(instance)}),
// total_operations value:DERIVE:0:U
sm::make_counter("total_received_messages", _received, sm::description("Total number of received messages"), {sm::shard_label(instance)})(sm::metric_disabled),
sm::make_counter("total_received_messages", _received, sm::description("Total number of received messages"), {sm::shard_label(instance)}),
// total_operations value:DERIVE:0:U
sm::make_counter("total_sent_messages", _sent, sm::description("Total number of sent messages"), {sm::shard_label(instance)})(sm::metric_disabled),
sm::make_counter("total_sent_messages", _sent, sm::description("Total number of sent messages"), {sm::shard_label(instance)}),
// total_operations value:DERIVE:0:U
sm::make_counter("total_completed_messages", _compl, sm::description("Total number of messages completed"), {sm::shard_label(instance)})(sm::metric_disabled)
sm::make_counter("total_completed_messages", _compl, sm::description("Total number of messages completed"), {sm::shard_label(instance)})
});
}

Expand Down