From c31a58f2e99bff601b83e269a2d6c18ea94de264 Mon Sep 17 00:00:00 2001 From: Amnon Heiman Date: Sun, 17 Jul 2022 13:20:04 +0300 Subject: [PATCH] replica/table.cc: Do not register per-table metrics for system There is a set of per-table metrics that should only be registered for user tables. As time passes there are more keyspaces that are not for the user keyspace and there is now a function that covers all those cases. This patch replaces the implementation to use is_internal_keyspace. Signed-off-by: Amnon Heiman --- replica/table.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/replica/table.cc b/replica/table.cc index 0f0bc66561..08417b968d 100644 --- a/replica/table.cc +++ b/replica/table.cc @@ -816,7 +816,7 @@ void table::set_metrics() { _view_stats.register_stats(); } - if (_schema->ks_name() != db::system_keyspace::NAME && _schema->ks_name() != db::schema_tables::v3::NAME && _schema->ks_name() != "system_traces") { + if (!is_internal_keyspace(_schema->ks_name())) { _metrics.add_group("column_family", { ms::make_histogram("read_latency", ms::description("Read latency histogram"), [this] {return to_metrics_histogram(_stats.estimated_read);})(cf)(ks), ms::make_histogram("write_latency", ms::description("Write latency histogram"), [this] {return to_metrics_histogram(_stats.estimated_write);})(cf)(ks),