treewide: change metric calls from make_derive to make_counter
make_derive was recently deprecated in favor of make_counter, so make the change throughput the codebase. Closes #10564
This commit is contained in:
@@ -635,9 +635,9 @@ void compaction_manager::register_metrics() {
|
||||
sm::description("Holds the number of currently active compactions.")),
|
||||
sm::make_gauge("pending_compactions", [this] { return _stats.pending_tasks; },
|
||||
sm::description("Holds the number of compaction tasks waiting for an opportunity to run.")),
|
||||
sm::make_derive("completed_compactions", [this] { return _stats.completed_tasks; },
|
||||
sm::make_counter("completed_compactions", [this] { return _stats.completed_tasks; },
|
||||
sm::description("Holds the number of completed compaction tasks.")),
|
||||
sm::make_derive("failed_compactions", [this] { return _stats.errors; },
|
||||
sm::make_counter("failed_compactions", [this] { return _stats.errors; },
|
||||
sm::description("Holds the number of failed compaction tasks.")),
|
||||
sm::make_gauge("postponed_compactions", [this] { return _postponed.size(); },
|
||||
sm::description("Holds the number of tables with postponed compaction.")),
|
||||
|
||||
@@ -82,13 +82,13 @@ query_processor::query_processor(service::storage_proxy& proxy, service::forward
|
||||
const auto system_ks_label_instance = ks_label("system");
|
||||
|
||||
std::vector<sm::metric_definition> qp_group;
|
||||
qp_group.push_back(sm::make_derive(
|
||||
qp_group.push_back(sm::make_counter(
|
||||
"statements_prepared",
|
||||
_stats.prepare_invocations,
|
||||
sm::description("Counts the total number of parsed CQL requests.")));
|
||||
for (auto cl = size_t(clevel::MIN_VALUE); cl <= size_t(clevel::MAX_VALUE); ++cl) {
|
||||
qp_group.push_back(
|
||||
sm::make_derive(
|
||||
sm::make_counter(
|
||||
"queries",
|
||||
_stats.queries_by_cl[cl],
|
||||
sm::description("Counts queries by consistency level."),
|
||||
@@ -103,7 +103,7 @@ query_processor::query_processor(service::storage_proxy& proxy, service::forward
|
||||
_metrics.add_group(
|
||||
"cql",
|
||||
{
|
||||
sm::make_derive(
|
||||
sm::make_counter(
|
||||
"reads",
|
||||
sm::description("Counts the total number of CQL SELECT requests."),
|
||||
[this] {
|
||||
@@ -114,7 +114,7 @@ query_processor::query_processor(service::storage_proxy& proxy, service::forward
|
||||
+ _cql_stats.query_cnt(source_selector::INTERNAL, ks_selector::NONSYSTEM, cond_selector::NO_CONDITIONS, stm::statement_type::SELECT);
|
||||
}),
|
||||
|
||||
sm::make_derive(
|
||||
sm::make_counter(
|
||||
"inserts",
|
||||
sm::description("Counts the total number of CQL INSERT requests with/without conditions."),
|
||||
{non_cas_label_instance},
|
||||
@@ -124,7 +124,7 @@ query_processor::query_processor(service::storage_proxy& proxy, service::forward
|
||||
+ _cql_stats.query_cnt(source_selector::INTERNAL, ks_selector::SYSTEM, cond_selector::NO_CONDITIONS, stm::statement_type::INSERT)
|
||||
+ _cql_stats.query_cnt(source_selector::INTERNAL, ks_selector::NONSYSTEM, cond_selector::NO_CONDITIONS, stm::statement_type::INSERT);
|
||||
}),
|
||||
sm::make_derive(
|
||||
sm::make_counter(
|
||||
"inserts",
|
||||
sm::description("Counts the total number of CQL INSERT requests with/without conditions."),
|
||||
{cas_label_instance},
|
||||
@@ -135,7 +135,7 @@ query_processor::query_processor(service::storage_proxy& proxy, service::forward
|
||||
+ _cql_stats.query_cnt(source_selector::INTERNAL, ks_selector::NONSYSTEM, cond_selector::WITH_CONDITIONS, stm::statement_type::INSERT);
|
||||
}),
|
||||
|
||||
sm::make_derive(
|
||||
sm::make_counter(
|
||||
"updates",
|
||||
sm::description("Counts the total number of CQL UPDATE requests with/without conditions."),
|
||||
{non_cas_label_instance},
|
||||
@@ -145,7 +145,7 @@ query_processor::query_processor(service::storage_proxy& proxy, service::forward
|
||||
+ _cql_stats.query_cnt(source_selector::INTERNAL, ks_selector::SYSTEM, cond_selector::NO_CONDITIONS, stm::statement_type::UPDATE)
|
||||
+ _cql_stats.query_cnt(source_selector::INTERNAL, ks_selector::NONSYSTEM, cond_selector::NO_CONDITIONS, stm::statement_type::UPDATE);
|
||||
}),
|
||||
sm::make_derive(
|
||||
sm::make_counter(
|
||||
"updates",
|
||||
sm::description("Counts the total number of CQL UPDATE requests with/without conditions."),
|
||||
{cas_label_instance},
|
||||
@@ -156,7 +156,7 @@ query_processor::query_processor(service::storage_proxy& proxy, service::forward
|
||||
+ _cql_stats.query_cnt(source_selector::INTERNAL, ks_selector::NONSYSTEM, cond_selector::WITH_CONDITIONS, stm::statement_type::UPDATE);
|
||||
}),
|
||||
|
||||
sm::make_derive(
|
||||
sm::make_counter(
|
||||
"deletes",
|
||||
sm::description("Counts the total number of CQL DELETE requests with/without conditions."),
|
||||
{non_cas_label_instance},
|
||||
@@ -166,7 +166,7 @@ query_processor::query_processor(service::storage_proxy& proxy, service::forward
|
||||
+ _cql_stats.query_cnt(source_selector::INTERNAL, ks_selector::SYSTEM, cond_selector::NO_CONDITIONS, stm::statement_type::DELETE)
|
||||
+ _cql_stats.query_cnt(source_selector::INTERNAL, ks_selector::NONSYSTEM, cond_selector::NO_CONDITIONS, stm::statement_type::DELETE);
|
||||
}),
|
||||
sm::make_derive(
|
||||
sm::make_counter(
|
||||
"deletes",
|
||||
sm::description("Counts the total number of CQL DELETE requests with/without conditions."),
|
||||
{cas_label_instance},
|
||||
@@ -177,149 +177,149 @@ query_processor::query_processor(service::storage_proxy& proxy, service::forward
|
||||
+ _cql_stats.query_cnt(source_selector::INTERNAL, ks_selector::NONSYSTEM, cond_selector::WITH_CONDITIONS, stm::statement_type::DELETE);
|
||||
}),
|
||||
|
||||
sm::make_derive(
|
||||
sm::make_counter(
|
||||
"reads_per_ks",
|
||||
// Reads fall into `cond_selector::NO_CONDITIONS' pigeonhole
|
||||
_cql_stats.query_cnt(source_selector::USER, ks_selector::SYSTEM, cond_selector::NO_CONDITIONS, stm::statement_type::SELECT),
|
||||
sm::description("Counts the number of CQL SELECT requests executed on particular keyspaces. "
|
||||
"Label `who' indicates where the reqs come from (clients or DB internals)"),
|
||||
{user_who_label_instance, system_ks_label_instance}),
|
||||
sm::make_derive(
|
||||
sm::make_counter(
|
||||
"reads_per_ks",
|
||||
_cql_stats.query_cnt(source_selector::INTERNAL, ks_selector::SYSTEM, cond_selector::NO_CONDITIONS, stm::statement_type::SELECT),
|
||||
sm::description("Counts the number of CQL SELECT requests executed on particular keyspaces. "
|
||||
"Label `who' indicates where the reqs come from (clients or DB internals)"),
|
||||
{internal_who_label_instance, system_ks_label_instance}),
|
||||
|
||||
sm::make_derive(
|
||||
sm::make_counter(
|
||||
"inserts_per_ks",
|
||||
_cql_stats.query_cnt(source_selector::USER, ks_selector::SYSTEM, cond_selector::NO_CONDITIONS, stm::statement_type::INSERT),
|
||||
sm::description("Counts the number of CQL INSERT requests executed on particular keyspaces. "
|
||||
"Label `who' indicates where the reqs come from (clients or DB internals)."),
|
||||
{user_who_label_instance, system_ks_label_instance, non_cas_label_instance}),
|
||||
sm::make_derive(
|
||||
sm::make_counter(
|
||||
"inserts_per_ks",
|
||||
_cql_stats.query_cnt(source_selector::INTERNAL, ks_selector::SYSTEM, cond_selector::NO_CONDITIONS, stm::statement_type::INSERT),
|
||||
sm::description("Counts the number of CQL INSERT requests executed on particular keyspaces. "
|
||||
"Label `who' indicates where the reqs come from (clients or DB internals)."),
|
||||
{internal_who_label_instance, system_ks_label_instance, non_cas_label_instance}),
|
||||
sm::make_derive(
|
||||
sm::make_counter(
|
||||
"inserts_per_ks",
|
||||
_cql_stats.query_cnt(source_selector::USER, ks_selector::SYSTEM, cond_selector::WITH_CONDITIONS, stm::statement_type::INSERT),
|
||||
sm::description("Counts the number of CQL INSERT requests executed on particular keyspaces. "
|
||||
"Label `who' indicates where the reqs come from (clients or DB internals)."),
|
||||
{user_who_label_instance, system_ks_label_instance, cas_label_instance}),
|
||||
sm::make_derive(
|
||||
sm::make_counter(
|
||||
"inserts_per_ks",
|
||||
_cql_stats.query_cnt(source_selector::INTERNAL, ks_selector::SYSTEM, cond_selector::WITH_CONDITIONS, stm::statement_type::INSERT),
|
||||
sm::description("Counts the number of CQL INSERT requests executed on particular keyspaces. "
|
||||
"Label `who' indicates where the reqs come from (clients or DB internals)."),
|
||||
{internal_who_label_instance, system_ks_label_instance, cas_label_instance}),
|
||||
|
||||
sm::make_derive(
|
||||
sm::make_counter(
|
||||
"updates_per_ks",
|
||||
_cql_stats.query_cnt(source_selector::USER, ks_selector::SYSTEM, cond_selector::NO_CONDITIONS, stm::statement_type::UPDATE),
|
||||
sm::description("Counts the number of CQL UPDATE requests executed on particular keyspaces. "
|
||||
"Label `who' indicates where the reqs come from (clients or DB internals)"),
|
||||
{user_who_label_instance, system_ks_label_instance, non_cas_label_instance}),
|
||||
sm::make_derive(
|
||||
sm::make_counter(
|
||||
"updates_per_ks",
|
||||
_cql_stats.query_cnt(source_selector::INTERNAL, ks_selector::SYSTEM, cond_selector::NO_CONDITIONS, stm::statement_type::UPDATE),
|
||||
sm::description("Counts the number of CQL UPDATE requests executed on particular keyspaces. "
|
||||
"Label `who' indicates where the reqs come from (clients or DB internals)"),
|
||||
{internal_who_label_instance, system_ks_label_instance, non_cas_label_instance}),
|
||||
sm::make_derive(
|
||||
sm::make_counter(
|
||||
"updates_per_ks",
|
||||
_cql_stats.query_cnt(source_selector::USER, ks_selector::SYSTEM, cond_selector::WITH_CONDITIONS, stm::statement_type::UPDATE),
|
||||
sm::description("Counts the number of CQL UPDATE requests executed on particular keyspaces. "
|
||||
"Label `who' indicates where the reqs come from (clients or DB internals)"),
|
||||
{user_who_label_instance, system_ks_label_instance, cas_label_instance}),
|
||||
sm::make_derive(
|
||||
sm::make_counter(
|
||||
"updates_per_ks",
|
||||
_cql_stats.query_cnt(source_selector::INTERNAL, ks_selector::SYSTEM, cond_selector::WITH_CONDITIONS, stm::statement_type::UPDATE),
|
||||
sm::description("Counts the number of CQL UPDATE requests executed on particular keyspaces. "
|
||||
"Label `who' indicates where the reqs come from (clients or DB internals)"),
|
||||
{internal_who_label_instance, system_ks_label_instance, cas_label_instance}),
|
||||
|
||||
sm::make_derive(
|
||||
sm::make_counter(
|
||||
"deletes_per_ks",
|
||||
_cql_stats.query_cnt(source_selector::USER, ks_selector::SYSTEM, cond_selector::NO_CONDITIONS, stm::statement_type::DELETE),
|
||||
sm::description("Counts the number of CQL DELETE requests executed on particular keyspaces. "
|
||||
"Label `who' indicates where the reqs come from (clients or DB internals)"),
|
||||
{user_who_label_instance, system_ks_label_instance, non_cas_label_instance}),
|
||||
sm::make_derive(
|
||||
sm::make_counter(
|
||||
"deletes_per_ks",
|
||||
_cql_stats.query_cnt(source_selector::INTERNAL, ks_selector::SYSTEM, cond_selector::NO_CONDITIONS, stm::statement_type::DELETE),
|
||||
sm::description("Counts the number of CQL DELETE requests executed on particular keyspaces. "
|
||||
"Label `who' indicates where the reqs come from (clients or DB internals)"),
|
||||
{internal_who_label_instance, system_ks_label_instance, non_cas_label_instance}),
|
||||
sm::make_derive(
|
||||
sm::make_counter(
|
||||
"deletes_per_ks",
|
||||
_cql_stats.query_cnt(source_selector::USER, ks_selector::SYSTEM, cond_selector::WITH_CONDITIONS, stm::statement_type::DELETE),
|
||||
sm::description("Counts the number of CQL DELETE requests executed on particular keyspaces. "
|
||||
"Label `who' indicates where the reqs come from (clients or DB internals)"),
|
||||
{user_who_label_instance, system_ks_label_instance, cas_label_instance}),
|
||||
sm::make_derive(
|
||||
sm::make_counter(
|
||||
"deletes_per_ks",
|
||||
_cql_stats.query_cnt(source_selector::INTERNAL, ks_selector::SYSTEM, cond_selector::WITH_CONDITIONS, stm::statement_type::DELETE),
|
||||
sm::description("Counts the number of CQL DELETE requests executed on particular keyspaces. "
|
||||
"Label `who' indicates where the reqs come from (clients or DB internals)"),
|
||||
{internal_who_label_instance, system_ks_label_instance, cas_label_instance}),
|
||||
|
||||
sm::make_derive(
|
||||
sm::make_counter(
|
||||
"batches",
|
||||
_cql_stats.batches,
|
||||
sm::description("Counts the total number of CQL BATCH requests without conditions."),
|
||||
{non_cas_label_instance}),
|
||||
|
||||
sm::make_derive(
|
||||
sm::make_counter(
|
||||
"batches",
|
||||
_cql_stats.cas_batches,
|
||||
sm::description("Counts the total number of CQL BATCH requests with conditions."),
|
||||
{cas_label_instance}),
|
||||
|
||||
sm::make_derive(
|
||||
sm::make_counter(
|
||||
"statements_in_batches",
|
||||
_cql_stats.statements_in_batches,
|
||||
sm::description("Counts the total number of sub-statements in CQL BATCH requests without conditions."),
|
||||
{non_cas_label_instance}),
|
||||
|
||||
sm::make_derive(
|
||||
sm::make_counter(
|
||||
"statements_in_batches",
|
||||
_cql_stats.statements_in_cas_batches,
|
||||
sm::description("Counts the total number of sub-statements in CQL BATCH requests with conditions."),
|
||||
{cas_label_instance}),
|
||||
|
||||
sm::make_derive(
|
||||
sm::make_counter(
|
||||
"batches_pure_logged",
|
||||
_cql_stats.batches_pure_logged,
|
||||
sm::description(
|
||||
"Counts the total number of LOGGED batches that were executed as LOGGED batches.")),
|
||||
|
||||
sm::make_derive(
|
||||
sm::make_counter(
|
||||
"batches_pure_unlogged",
|
||||
_cql_stats.batches_pure_unlogged,
|
||||
sm::description(
|
||||
"Counts the total number of UNLOGGED batches that were executed as UNLOGGED "
|
||||
"batches.")),
|
||||
|
||||
sm::make_derive(
|
||||
sm::make_counter(
|
||||
"batches_unlogged_from_logged",
|
||||
_cql_stats.batches_unlogged_from_logged,
|
||||
sm::description("Counts the total number of LOGGED batches that were executed as UNLOGGED "
|
||||
"batches.")),
|
||||
|
||||
sm::make_derive(
|
||||
sm::make_counter(
|
||||
"rows_read",
|
||||
_cql_stats.rows_read,
|
||||
sm::description("Counts the total number of rows read during CQL requests.")),
|
||||
|
||||
sm::make_derive(
|
||||
sm::make_counter(
|
||||
"prepared_cache_evictions",
|
||||
[] { return prepared_statements_cache::shard_stats().prepared_cache_evictions; },
|
||||
sm::description("Counts the number of prepared statements cache entries evictions.")),
|
||||
|
||||
sm::make_derive(
|
||||
sm::make_counter(
|
||||
"unprivileged_entries_evictions_on_size",
|
||||
[] { return prepared_statements_cache::shard_stats().unprivileged_entries_evictions_on_size; },
|
||||
sm::description("Counts a number of evictions of prepared statements from the prepared statements cache after they have been used only once. An increasing counter suggests the user may be preparing a different statement for each request instead of reusing the same prepared statement with parameters.")),
|
||||
@@ -334,83 +334,83 @@ query_processor::query_processor(service::storage_proxy& proxy, service::forward
|
||||
[this] { return _prepared_cache.memory_footprint(); },
|
||||
sm::description("Size (in bytes) of the prepared statements cache.")),
|
||||
|
||||
sm::make_derive(
|
||||
sm::make_counter(
|
||||
"secondary_index_creates",
|
||||
_cql_stats.secondary_index_creates,
|
||||
sm::description("Counts the total number of CQL CREATE INDEX requests.")),
|
||||
|
||||
sm::make_derive(
|
||||
sm::make_counter(
|
||||
"secondary_index_drops",
|
||||
_cql_stats.secondary_index_drops,
|
||||
sm::description("Counts the total number of CQL DROP INDEX requests.")),
|
||||
|
||||
// secondary_index_reads total count is also included in all cql reads
|
||||
sm::make_derive(
|
||||
sm::make_counter(
|
||||
"secondary_index_reads",
|
||||
_cql_stats.secondary_index_reads,
|
||||
sm::description("Counts the total number of CQL read requests performed using secondary indexes.")),
|
||||
|
||||
// secondary_index_rows_read total count is also included in all cql rows read
|
||||
sm::make_derive(
|
||||
sm::make_counter(
|
||||
"secondary_index_rows_read",
|
||||
_cql_stats.secondary_index_rows_read,
|
||||
sm::description("Counts the total number of rows read during CQL requests performed using secondary indexes.")),
|
||||
|
||||
// read requests that required ALLOW FILTERING
|
||||
sm::make_derive(
|
||||
sm::make_counter(
|
||||
"filtered_read_requests",
|
||||
_cql_stats.filtered_reads,
|
||||
sm::description("Counts the total number of CQL read requests that required ALLOW FILTERING. See filtered_rows_read_total to compare how many rows needed to be filtered.")),
|
||||
|
||||
// rows read with filtering enabled (because ALLOW FILTERING was required)
|
||||
sm::make_derive(
|
||||
sm::make_counter(
|
||||
"filtered_rows_read_total",
|
||||
_cql_stats.filtered_rows_read_total,
|
||||
sm::description("Counts the total number of rows read during CQL requests that required ALLOW FILTERING. See filtered_rows_matched_total and filtered_rows_dropped_total for information how accurate filtering queries are.")),
|
||||
|
||||
// rows read with filtering enabled and accepted by the filter
|
||||
sm::make_derive(
|
||||
sm::make_counter(
|
||||
"filtered_rows_matched_total",
|
||||
_cql_stats.filtered_rows_matched_total,
|
||||
sm::description("Counts the number of rows read during CQL requests that required ALLOW FILTERING and accepted by the filter. Number similar to filtered_rows_read_total indicates that filtering is accurate.")),
|
||||
|
||||
// rows read with filtering enabled and rejected by the filter
|
||||
sm::make_derive(
|
||||
sm::make_counter(
|
||||
"filtered_rows_dropped_total",
|
||||
[this]() {return _cql_stats.filtered_rows_read_total - _cql_stats.filtered_rows_matched_total;},
|
||||
sm::description("Counts the number of rows read during CQL requests that required ALLOW FILTERING and dropped by the filter. Number similar to filtered_rows_read_total indicates that filtering is not accurate and might cause performance degradation.")),
|
||||
|
||||
sm::make_derive(
|
||||
sm::make_counter(
|
||||
"select_bypass_caches",
|
||||
_cql_stats.select_bypass_caches,
|
||||
sm::description("Counts the number of SELECT query executions with BYPASS CACHE option.")),
|
||||
|
||||
sm::make_derive(
|
||||
sm::make_counter(
|
||||
"select_allow_filtering",
|
||||
_cql_stats.select_allow_filtering,
|
||||
sm::description("Counts the number of SELECT query executions with ALLOW FILTERING option.")),
|
||||
|
||||
sm::make_derive(
|
||||
sm::make_counter(
|
||||
"select_partition_range_scan",
|
||||
_cql_stats.select_partition_range_scan,
|
||||
sm::description("Counts the number of SELECT query executions requiring partition range scan.")),
|
||||
|
||||
sm::make_derive(
|
||||
sm::make_counter(
|
||||
"select_partition_range_scan_no_bypass_cache",
|
||||
_cql_stats.select_partition_range_scan_no_bypass_cache,
|
||||
sm::description("Counts the number of SELECT query executions requiring partition range scan without BYPASS CACHE option.")),
|
||||
|
||||
sm::make_derive(
|
||||
sm::make_counter(
|
||||
"select_parallelized",
|
||||
_cql_stats.select_parallelized,
|
||||
sm::description("Counts the number of parallelized aggregation SELECT query executions.")),
|
||||
|
||||
sm::make_derive(
|
||||
sm::make_counter(
|
||||
"authorized_prepared_statements_cache_evictions",
|
||||
[] { return authorized_prepared_statements_cache::shard_stats().authorized_prepared_statements_cache_evictions; },
|
||||
sm::description("Counts the number of authenticated prepared statements cache entries evictions.")),
|
||||
|
||||
sm::make_derive(
|
||||
sm::make_counter(
|
||||
"authorized_prepared_statements_unprivileged_entries_evictions_on_size",
|
||||
[] { return authorized_prepared_statements_cache::shard_stats().authorized_prepared_statements_unprivileged_entries_evictions_on_size; },
|
||||
sm::description("Counts a number of evictions of prepared statements from the authorized prepared statements cache after they have been used only once. An increasing counter suggests the user may be preparing a different statement for each request instead of reusing the same prepared statement with parameters.")),
|
||||
|
||||
@@ -57,7 +57,7 @@ db::batchlog_manager::batchlog_manager(cql3::query_processor& qp, batchlog_manag
|
||||
namespace sm = seastar::metrics;
|
||||
|
||||
_metrics.add_group("batchlog_manager", {
|
||||
sm::make_derive("total_write_replay_attempts", _stats.write_attempts,
|
||||
sm::make_counter("total_write_replay_attempts", _stats.write_attempts,
|
||||
sm::description("Counts write operations issued in a batchlog replay flow. "
|
||||
"The high value of this metric indicates that we have a long batch replay list.")),
|
||||
});
|
||||
|
||||
@@ -1444,21 +1444,21 @@ void db::commitlog::segment_manager::create_counters(const sstring& metrics_cate
|
||||
sm::description("Holds the current number of unused segments. "
|
||||
"A non-zero value indicates that the disk write path became temporary slow.")),
|
||||
|
||||
sm::make_derive("alloc", totals.allocation_count,
|
||||
sm::make_counter("alloc", totals.allocation_count,
|
||||
sm::description("Counts a number of times a new mutation has been added to a segment. "
|
||||
"Divide bytes_written by this value to get the average number of bytes per mutation written to the disk.")),
|
||||
|
||||
sm::make_derive("cycle", totals.cycle_count,
|
||||
sm::make_counter("cycle", totals.cycle_count,
|
||||
sm::description("Counts a number of commitlog write cycles - when the data is written from the internal memory buffer to the disk.")),
|
||||
|
||||
sm::make_derive("flush", totals.flush_count,
|
||||
sm::make_counter("flush", totals.flush_count,
|
||||
sm::description("Counts a number of times the flush() method was called for a file.")),
|
||||
|
||||
sm::make_derive("bytes_written", totals.bytes_written,
|
||||
sm::make_counter("bytes_written", totals.bytes_written,
|
||||
sm::description("Counts a number of bytes written to the disk. "
|
||||
"Divide this value by \"alloc\" to get the average number of bytes per mutation written to the disk.")),
|
||||
|
||||
sm::make_derive("slack", totals.bytes_slack,
|
||||
sm::make_counter("slack", totals.bytes_slack,
|
||||
sm::description("Counts a number of unused bytes written to the disk due to disk segment alignment.")),
|
||||
|
||||
sm::make_gauge("pending_flushes", totals.pending_flushes,
|
||||
@@ -1468,11 +1468,11 @@ void db::commitlog::segment_manager::create_counters(const sstring& metrics_cate
|
||||
sm::description("Holds a number of currently pending allocations. "
|
||||
"A non-zero value indicates that we have a bottleneck in the disk write flow.")),
|
||||
|
||||
sm::make_derive("requests_blocked_memory", totals.requests_blocked_memory,
|
||||
sm::make_counter("requests_blocked_memory", totals.requests_blocked_memory,
|
||||
sm::description("Counts a number of requests blocked due to memory pressure. "
|
||||
"A non-zero value indicates that the commitlog memory quota is not enough to serve the required amount of requests.")),
|
||||
|
||||
sm::make_derive("flush_limit_exceeded", totals.flush_limit_exceeded,
|
||||
sm::make_counter("flush_limit_exceeded", totals.flush_limit_exceeded,
|
||||
sm::description(
|
||||
seastar::format("Counts a number of times a flush limit was exceeded. "
|
||||
"A non-zero value indicates that there are too many pending flush operations (see pending_flushes) and some of "
|
||||
|
||||
@@ -65,22 +65,22 @@ void manager::register_metrics(const sstring& group_name) {
|
||||
sm::make_gauge("size_of_hints_in_progress", _stats.size_of_hints_in_progress,
|
||||
sm::description("Size of hinted mutations that are scheduled to be written.")),
|
||||
|
||||
sm::make_derive("written", _stats.written,
|
||||
sm::make_counter("written", _stats.written,
|
||||
sm::description("Number of successfully written hints.")),
|
||||
|
||||
sm::make_derive("errors", _stats.errors,
|
||||
sm::make_counter("errors", _stats.errors,
|
||||
sm::description("Number of errors during hints writes.")),
|
||||
|
||||
sm::make_derive("dropped", _stats.dropped,
|
||||
sm::make_counter("dropped", _stats.dropped,
|
||||
sm::description("Number of dropped hints.")),
|
||||
|
||||
sm::make_derive("sent", _stats.sent,
|
||||
sm::make_counter("sent", _stats.sent,
|
||||
sm::description("Number of sent hints.")),
|
||||
|
||||
sm::make_derive("discarded", _stats.discarded,
|
||||
sm::make_counter("discarded", _stats.discarded,
|
||||
sm::description("Number of hints that were discarded during sending (too old, schema changed, etc.).")),
|
||||
|
||||
sm::make_derive("corrupted_files", _stats.corrupted_files,
|
||||
sm::make_counter("corrupted_files", _stats.corrupted_files,
|
||||
sm::description("Number of hints files that were discarded during sending because the file was corrupted.")),
|
||||
|
||||
sm::make_gauge("pending_drains",
|
||||
|
||||
@@ -1342,11 +1342,11 @@ void view_builder::setup_metrics() {
|
||||
sm::description("Number of tasks waiting to perform bookkeeping operations"),
|
||||
[this] { return _sem.waiters(); }),
|
||||
|
||||
sm::make_derive("steps_performed",
|
||||
sm::make_counter("steps_performed",
|
||||
sm::description("Number of performed build steps."),
|
||||
_stats.steps_performed),
|
||||
|
||||
sm::make_derive("steps_failed",
|
||||
sm::make_counter("steps_failed",
|
||||
sm::description("Number of failed build steps."),
|
||||
_stats.steps_failed),
|
||||
|
||||
|
||||
@@ -112,7 +112,7 @@ gossiper::gossiper(abort_source& as, feature_service& features, const locator::s
|
||||
namespace sm = seastar::metrics;
|
||||
auto ep = get_broadcast_address();
|
||||
_metrics.add_group("gossip", {
|
||||
sm::make_derive("heart_beat",
|
||||
sm::make_counter("heart_beat",
|
||||
[ep, this] {
|
||||
auto es = get_endpoint_state_for_endpoint_ptr(ep);
|
||||
if (es) {
|
||||
|
||||
@@ -29,11 +29,11 @@ stats::stats() : api_operations{} {
|
||||
OPERATION(_select, "select")
|
||||
});
|
||||
_metrics.add_group("redis", {
|
||||
seastar::metrics::make_derive("redis-connections", _connects,
|
||||
seastar::metrics::make_counter("redis-connections", _connects,
|
||||
seastar::metrics::description("Counts a number of client connections.")),
|
||||
seastar::metrics::make_gauge("current_connections", _connections,
|
||||
seastar::metrics::description("Holds a current number of client connections.")),
|
||||
seastar::metrics::make_derive("requests_served", _requests_served,
|
||||
seastar::metrics::make_counter("requests_served", _requests_served,
|
||||
seastar::metrics::description("Counts a number of served requests.")),
|
||||
seastar::metrics::make_gauge("requests_serving", _requests_serving,
|
||||
seastar::metrics::description("Holds a number of requests that are being processed right now.")),
|
||||
|
||||
@@ -175,21 +175,21 @@ struct row_level_repair_metrics {
|
||||
row_level_repair_metrics() {
|
||||
namespace sm = seastar::metrics;
|
||||
_metrics.add_group("repair", {
|
||||
sm::make_derive("tx_row_nr", tx_row_nr,
|
||||
sm::make_counter("tx_row_nr", tx_row_nr,
|
||||
sm::description("Total number of rows sent on this shard.")),
|
||||
sm::make_derive("rx_row_nr", rx_row_nr,
|
||||
sm::make_counter("rx_row_nr", rx_row_nr,
|
||||
sm::description("Total number of rows received on this shard.")),
|
||||
sm::make_derive("tx_row_bytes", tx_row_bytes,
|
||||
sm::make_counter("tx_row_bytes", tx_row_bytes,
|
||||
sm::description("Total bytes of rows sent on this shard.")),
|
||||
sm::make_derive("rx_row_bytes", rx_row_bytes,
|
||||
sm::make_counter("rx_row_bytes", rx_row_bytes,
|
||||
sm::description("Total bytes of rows received on this shard.")),
|
||||
sm::make_derive("tx_hashes_nr", tx_hashes_nr,
|
||||
sm::make_counter("tx_hashes_nr", tx_hashes_nr,
|
||||
sm::description("Total number of row hashes sent on this shard.")),
|
||||
sm::make_derive("rx_hashes_nr", rx_hashes_nr,
|
||||
sm::make_counter("rx_hashes_nr", rx_hashes_nr,
|
||||
sm::description("Total number of row hashes received on this shard.")),
|
||||
sm::make_derive("row_from_disk_nr", row_from_disk_nr,
|
||||
sm::make_counter("row_from_disk_nr", row_from_disk_nr,
|
||||
sm::description("Total number of rows read from disk on this shard.")),
|
||||
sm::make_derive("row_from_disk_bytes", row_from_disk_bytes,
|
||||
sm::make_counter("row_from_disk_bytes", row_from_disk_bytes,
|
||||
sm::description("Total bytes of rows read from disk on this shard.")),
|
||||
});
|
||||
}
|
||||
|
||||
@@ -514,54 +514,54 @@ database::setup_metrics() {
|
||||
seastar::format("Holds the current number of requests blocked due to reaching the memory quota ({}B). "
|
||||
"Non-zero value indicates that our bottleneck is memory and more specifically - the memory quota allocated for the \"database\" component.", _dirty_memory_manager.throttle_threshold()))),
|
||||
|
||||
sm::make_derive("requests_blocked_memory", [this] { return _dirty_memory_manager.region_group().blocked_requests_counter(); },
|
||||
sm::make_counter("requests_blocked_memory", [this] { return _dirty_memory_manager.region_group().blocked_requests_counter(); },
|
||||
sm::description(seastar::format("Holds the current number of requests blocked due to reaching the memory quota ({}B). "
|
||||
"Non-zero value indicates that our bottleneck is memory and more specifically - the memory quota allocated for the \"database\" component.", _dirty_memory_manager.throttle_threshold()))),
|
||||
|
||||
sm::make_derive("clustering_filter_count", _cf_stats.clustering_filter_count,
|
||||
sm::make_counter("clustering_filter_count", _cf_stats.clustering_filter_count,
|
||||
sm::description("Counts bloom filter invocations.")),
|
||||
|
||||
sm::make_derive("clustering_filter_sstables_checked", _cf_stats.sstables_checked_by_clustering_filter,
|
||||
sm::make_counter("clustering_filter_sstables_checked", _cf_stats.sstables_checked_by_clustering_filter,
|
||||
sm::description("Counts sstables checked after applying the bloom filter. "
|
||||
"High value indicates that bloom filter is not very efficient.")),
|
||||
|
||||
sm::make_derive("clustering_filter_fast_path_count", _cf_stats.clustering_filter_fast_path_count,
|
||||
sm::make_counter("clustering_filter_fast_path_count", _cf_stats.clustering_filter_fast_path_count,
|
||||
sm::description("Counts number of times bloom filtering short cut to include all sstables when only one full range was specified.")),
|
||||
|
||||
sm::make_derive("clustering_filter_surviving_sstables", _cf_stats.surviving_sstables_after_clustering_filter,
|
||||
sm::make_counter("clustering_filter_surviving_sstables", _cf_stats.surviving_sstables_after_clustering_filter,
|
||||
sm::description("Counts sstables that survived the clustering key filtering. "
|
||||
"High value indicates that bloom filter is not very efficient and still have to access a lot of sstables to get data.")),
|
||||
|
||||
sm::make_derive("dropped_view_updates", _cf_stats.dropped_view_updates,
|
||||
sm::make_counter("dropped_view_updates", _cf_stats.dropped_view_updates,
|
||||
sm::description("Counts the number of view updates that have been dropped due to cluster overload. ")),
|
||||
|
||||
sm::make_derive("view_building_paused", _cf_stats.view_building_paused,
|
||||
sm::make_counter("view_building_paused", _cf_stats.view_building_paused,
|
||||
sm::description("Counts the number of times view building process was paused (e.g. due to node unavailability). ")),
|
||||
|
||||
sm::make_derive("total_writes", _stats->total_writes,
|
||||
sm::make_counter("total_writes", _stats->total_writes,
|
||||
sm::description("Counts the total number of successful write operations performed by this shard.")),
|
||||
|
||||
sm::make_derive("total_writes_failed", _stats->total_writes_failed,
|
||||
sm::make_counter("total_writes_failed", _stats->total_writes_failed,
|
||||
sm::description("Counts the total number of failed write operations. "
|
||||
"A sum of this value plus total_writes represents a total amount of writes attempted on this shard.")),
|
||||
|
||||
sm::make_derive("total_writes_timedout", _stats->total_writes_timedout,
|
||||
sm::make_counter("total_writes_timedout", _stats->total_writes_timedout,
|
||||
sm::description("Counts write operations failed due to a timeout. A positive value is a sign of storage being overloaded.")),
|
||||
|
||||
sm::make_derive("total_reads", _read_concurrency_sem.get_stats().total_successful_reads,
|
||||
sm::make_counter("total_reads", _read_concurrency_sem.get_stats().total_successful_reads,
|
||||
sm::description("Counts the total number of successful user reads on this shard."),
|
||||
{user_label_instance}),
|
||||
|
||||
sm::make_derive("total_reads_failed", _read_concurrency_sem.get_stats().total_failed_reads,
|
||||
sm::make_counter("total_reads_failed", _read_concurrency_sem.get_stats().total_failed_reads,
|
||||
sm::description("Counts the total number of failed user read operations. "
|
||||
"Add the total_reads to this value to get the total amount of reads issued on this shard."),
|
||||
{user_label_instance}),
|
||||
|
||||
sm::make_derive("total_reads", _system_read_concurrency_sem.get_stats().total_successful_reads,
|
||||
sm::make_counter("total_reads", _system_read_concurrency_sem.get_stats().total_successful_reads,
|
||||
sm::description("Counts the total number of successful system reads on this shard."),
|
||||
{system_label_instance}),
|
||||
|
||||
sm::make_derive("total_reads_failed", _system_read_concurrency_sem.get_stats().total_failed_reads,
|
||||
sm::make_counter("total_reads_failed", _system_read_concurrency_sem.get_stats().total_failed_reads,
|
||||
sm::description("Counts the total number of failed system read operations. "
|
||||
"Add the total_reads to this value to get the total amount of reads issued on this shard."),
|
||||
{system_label_instance}),
|
||||
@@ -569,26 +569,26 @@ database::setup_metrics() {
|
||||
sm::make_current_bytes("view_update_backlog", [this] { return get_view_update_backlog().current; },
|
||||
sm::description("Holds the current size in bytes of the pending view updates for all tables")),
|
||||
|
||||
sm::make_derive("querier_cache_lookups", _querier_cache.get_stats().lookups,
|
||||
sm::make_counter("querier_cache_lookups", _querier_cache.get_stats().lookups,
|
||||
sm::description("Counts querier cache lookups (paging queries)")),
|
||||
|
||||
sm::make_derive("querier_cache_misses", _querier_cache.get_stats().misses,
|
||||
sm::make_counter("querier_cache_misses", _querier_cache.get_stats().misses,
|
||||
sm::description("Counts querier cache lookups that failed to find a cached querier")),
|
||||
|
||||
sm::make_derive("querier_cache_drops", _querier_cache.get_stats().drops,
|
||||
sm::make_counter("querier_cache_drops", _querier_cache.get_stats().drops,
|
||||
sm::description("Counts querier cache lookups that found a cached querier but had to drop it due to position mismatch")),
|
||||
|
||||
sm::make_derive("querier_cache_time_based_evictions", _querier_cache.get_stats().time_based_evictions,
|
||||
sm::make_counter("querier_cache_time_based_evictions", _querier_cache.get_stats().time_based_evictions,
|
||||
sm::description("Counts querier cache entries that timed out and were evicted.")),
|
||||
|
||||
sm::make_derive("querier_cache_resource_based_evictions", _querier_cache.get_stats().resource_based_evictions,
|
||||
sm::make_counter("querier_cache_resource_based_evictions", _querier_cache.get_stats().resource_based_evictions,
|
||||
sm::description("Counts querier cache entries that were evicted to free up resources "
|
||||
"(limited by reader concurency limits) necessary to create new readers.")),
|
||||
|
||||
sm::make_gauge("querier_cache_population", _querier_cache.get_stats().population,
|
||||
sm::description("The number of entries currently in the querier cache.")),
|
||||
|
||||
sm::make_derive("sstable_read_queue_overloads", _read_concurrency_sem.get_stats().total_reads_shed_due_to_overload,
|
||||
sm::make_counter("sstable_read_queue_overloads", _read_concurrency_sem.get_stats().total_reads_shed_due_to_overload,
|
||||
sm::description("Counts the number of times the sstable read queue was overloaded. "
|
||||
"A non-zero value indicates that we have to drop read requests because they arrive faster than we can serve them.")),
|
||||
|
||||
@@ -614,13 +614,13 @@ database::setup_metrics() {
|
||||
sm::description("The number of currently active reads that are temporarily paused."),
|
||||
{user_label_instance}),
|
||||
|
||||
sm::make_derive("paused_reads_permit_based_evictions", _read_concurrency_sem.get_stats().permit_based_evictions,
|
||||
sm::make_counter("paused_reads_permit_based_evictions", _read_concurrency_sem.get_stats().permit_based_evictions,
|
||||
sm::description("The number of paused reads evicted to free up permits."
|
||||
" Permits are required for new reads to start, and the database will evict paused reads (if any)"
|
||||
" to be able to admit new ones, if there is a shortage of permits."),
|
||||
{user_label_instance}),
|
||||
|
||||
sm::make_derive("reads_shed_due_to_overload", _read_concurrency_sem.get_stats().total_reads_shed_due_to_overload,
|
||||
sm::make_counter("reads_shed_due_to_overload", _read_concurrency_sem.get_stats().total_reads_shed_due_to_overload,
|
||||
sm::description("The number of reads shed because the admission queue reached its max capacity."
|
||||
" When the queue is full, excessive reads are shed to avoid overload."),
|
||||
{user_label_instance}),
|
||||
@@ -644,13 +644,13 @@ database::setup_metrics() {
|
||||
sm::description("The number of currently ongoing streaming reads that are temporarily paused."),
|
||||
{streaming_label_instance}),
|
||||
|
||||
sm::make_derive("paused_reads_permit_based_evictions", _streaming_concurrency_sem.get_stats().permit_based_evictions,
|
||||
sm::make_counter("paused_reads_permit_based_evictions", _streaming_concurrency_sem.get_stats().permit_based_evictions,
|
||||
sm::description("The number of inactive streaming reads evicted to free up permits"
|
||||
" Permits are required for new reads to start, and the database will evict paused reads (if any)"
|
||||
" to be able to admit new ones, if there is a shortage of permits."),
|
||||
{streaming_label_instance}),
|
||||
|
||||
sm::make_derive("reads_shed_due_to_overload", _streaming_concurrency_sem.get_stats().total_reads_shed_due_to_overload,
|
||||
sm::make_counter("reads_shed_due_to_overload", _streaming_concurrency_sem.get_stats().total_reads_shed_due_to_overload,
|
||||
sm::description("The number of reads shed because the admission queue reached its max capacity."
|
||||
" When the queue is full, excessive reads are shed to avoid overload."),
|
||||
{streaming_label_instance}),
|
||||
@@ -673,13 +673,13 @@ database::setup_metrics() {
|
||||
sm::description("The number of currently ongoing system reads that are temporarily paused."),
|
||||
{system_label_instance}),
|
||||
|
||||
sm::make_derive("paused_reads_permit_based_evictions", _system_read_concurrency_sem.get_stats().permit_based_evictions,
|
||||
sm::make_counter("paused_reads_permit_based_evictions", _system_read_concurrency_sem.get_stats().permit_based_evictions,
|
||||
sm::description("The number of paused system reads evicted to free up permits"
|
||||
" Permits are required for new reads to start, and the database will evict inactive reads (if any)"
|
||||
" to be able to admit new ones, if there is a shortage of permits."),
|
||||
{system_label_instance}),
|
||||
|
||||
sm::make_derive("reads_shed_due_to_overload", _system_read_concurrency_sem.get_stats().total_reads_shed_due_to_overload,
|
||||
sm::make_counter("reads_shed_due_to_overload", _system_read_concurrency_sem.get_stats().total_reads_shed_due_to_overload,
|
||||
sm::description("The number of reads shed because the admission queue reached its max capacity."
|
||||
" When the queue is full, excessive reads are shed to avoid overload."),
|
||||
{system_label_instance}),
|
||||
@@ -687,22 +687,22 @@ database::setup_metrics() {
|
||||
sm::make_gauge("total_result_bytes", [this] { return get_result_memory_limiter().total_used_memory(); },
|
||||
sm::description("Holds the current amount of memory used for results.")),
|
||||
|
||||
sm::make_derive("short_data_queries", _stats->short_data_queries,
|
||||
sm::make_counter("short_data_queries", _stats->short_data_queries,
|
||||
sm::description("The rate of data queries (data or digest reads) that returned less rows than requested due to result size limiting.")),
|
||||
|
||||
sm::make_derive("short_mutation_queries", _stats->short_mutation_queries,
|
||||
sm::make_counter("short_mutation_queries", _stats->short_mutation_queries,
|
||||
sm::description("The rate of mutation queries that returned less rows than requested due to result size limiting.")),
|
||||
|
||||
sm::make_derive("multishard_query_unpopped_fragments", _stats->multishard_query_unpopped_fragments,
|
||||
sm::make_counter("multishard_query_unpopped_fragments", _stats->multishard_query_unpopped_fragments,
|
||||
sm::description("The total number of fragments that were extracted from the shard reader but were unconsumed by the query and moved back into the reader.")),
|
||||
|
||||
sm::make_derive("multishard_query_unpopped_bytes", _stats->multishard_query_unpopped_bytes,
|
||||
sm::make_counter("multishard_query_unpopped_bytes", _stats->multishard_query_unpopped_bytes,
|
||||
sm::description("The total number of bytes that were extracted from the shard reader but were unconsumed by the query and moved back into the reader.")),
|
||||
|
||||
sm::make_derive("multishard_query_failed_reader_stops", _stats->multishard_query_failed_reader_stops,
|
||||
sm::make_counter("multishard_query_failed_reader_stops", _stats->multishard_query_failed_reader_stops,
|
||||
sm::description("The number of times the stopping of a shard reader failed.")),
|
||||
|
||||
sm::make_derive("multishard_query_failed_reader_saves", _stats->multishard_query_failed_reader_saves,
|
||||
sm::make_counter("multishard_query_failed_reader_saves", _stats->multishard_query_failed_reader_saves,
|
||||
sm::description("The number of times the saving of a shard reader failed.")),
|
||||
|
||||
sm::make_total_operations("counter_cell_lock_acquisition", _cl_stats->lock_acquisitions,
|
||||
@@ -729,7 +729,7 @@ database::setup_metrics() {
|
||||
});
|
||||
if (this_shard_id() == 0) {
|
||||
_metrics.add_group("database", {
|
||||
sm::make_derive("schema_changed", _schema_change_count,
|
||||
sm::make_counter("schema_changed", _schema_change_count,
|
||||
sm::description("The number of times the schema changed")),
|
||||
});
|
||||
}
|
||||
|
||||
@@ -771,7 +771,7 @@ void table::set_metrics() {
|
||||
namespace ms = seastar::metrics;
|
||||
if (_config.enable_metrics_reporting) {
|
||||
_metrics.add_group("column_family", {
|
||||
ms::make_derive("memtable_switch", ms::description("Number of times flush has resulted in the memtable being switched out"), _stats.memtable_switch_count)(cf)(ks),
|
||||
ms::make_counter("memtable_switch", ms::description("Number of times flush has resulted in the memtable being switched out"), _stats.memtable_switch_count)(cf)(ks),
|
||||
ms::make_counter("memtable_partition_writes", [this] () { return _stats.memtable_partition_insertions + _stats.memtable_partition_hits; }, ms::description("Number of write operations performed on partitions in memtables"))(cf)(ks),
|
||||
ms::make_counter("memtable_partition_hits", _stats.memtable_partition_hits, ms::description("Number of times a write operation was issued on an existing partition in memtables"))(cf)(ks),
|
||||
ms::make_counter("memtable_row_writes", _stats.memtable_app_stats.row_writes, ms::description("Number of row writes performed in memtables"))(cf)(ks),
|
||||
|
||||
52
row_cache.cc
52
row_cache.cc
@@ -103,39 +103,39 @@ cache_tracker::setup_metrics() {
|
||||
_metrics.add_group("cache", {
|
||||
sm::make_gauge("bytes_used", sm::description("current bytes used by the cache out of the total size of memory"), [this] { return _region.occupancy().used_space(); }),
|
||||
sm::make_gauge("bytes_total", sm::description("total size of memory for the cache"), [this] { return _region.occupancy().total_space(); }),
|
||||
sm::make_derive("partition_hits", sm::description("number of partitions needed by reads and found in cache"), _stats.partition_hits),
|
||||
sm::make_derive("partition_misses", sm::description("number of partitions needed by reads and missing in cache"), _stats.partition_misses),
|
||||
sm::make_derive("partition_insertions", sm::description("total number of partitions added to cache"), _stats.partition_insertions),
|
||||
sm::make_derive("row_hits", sm::description("total number of rows needed by reads and found in cache"), _stats.row_hits),
|
||||
sm::make_derive("dummy_row_hits", sm::description("total number of dummy rows touched by reads in cache"), _stats.dummy_row_hits),
|
||||
sm::make_derive("row_misses", sm::description("total number of rows needed by reads and missing in cache"), _stats.row_misses),
|
||||
sm::make_derive("row_insertions", sm::description("total number of rows added to cache"), _stats.row_insertions),
|
||||
sm::make_derive("row_evictions", sm::description("total number of rows evicted from cache"), _stats.row_evictions),
|
||||
sm::make_derive("row_removals", sm::description("total number of invalidated rows"), _stats.row_removals),
|
||||
sm::make_derive("static_row_insertions", sm::description("total number of static rows added to cache"), _stats.static_row_insertions),
|
||||
sm::make_derive("concurrent_misses_same_key", sm::description("total number of operation with misses same key"), _stats.concurrent_misses_same_key),
|
||||
sm::make_derive("partition_merges", sm::description("total number of partitions merged"), _stats.partition_merges),
|
||||
sm::make_derive("partition_evictions", sm::description("total number of evicted partitions"), _stats.partition_evictions),
|
||||
sm::make_derive("partition_removals", sm::description("total number of invalidated partitions"), _stats.partition_removals),
|
||||
sm::make_derive("mispopulations", sm::description("number of entries not inserted by reads"), _stats.mispopulations),
|
||||
sm::make_counter("partition_hits", sm::description("number of partitions needed by reads and found in cache"), _stats.partition_hits),
|
||||
sm::make_counter("partition_misses", sm::description("number of partitions needed by reads and missing in cache"), _stats.partition_misses),
|
||||
sm::make_counter("partition_insertions", sm::description("total number of partitions added to cache"), _stats.partition_insertions),
|
||||
sm::make_counter("row_hits", sm::description("total number of rows needed by reads and found in cache"), _stats.row_hits),
|
||||
sm::make_counter("dummy_row_hits", sm::description("total number of dummy rows touched by reads in cache"), _stats.dummy_row_hits),
|
||||
sm::make_counter("row_misses", sm::description("total number of rows needed by reads and missing in cache"), _stats.row_misses),
|
||||
sm::make_counter("row_insertions", sm::description("total number of rows added to cache"), _stats.row_insertions),
|
||||
sm::make_counter("row_evictions", sm::description("total number of rows evicted from cache"), _stats.row_evictions),
|
||||
sm::make_counter("row_removals", sm::description("total number of invalidated rows"), _stats.row_removals),
|
||||
sm::make_counter("static_row_insertions", sm::description("total number of static rows added to cache"), _stats.static_row_insertions),
|
||||
sm::make_counter("concurrent_misses_same_key", sm::description("total number of operation with misses same key"), _stats.concurrent_misses_same_key),
|
||||
sm::make_counter("partition_merges", sm::description("total number of partitions merged"), _stats.partition_merges),
|
||||
sm::make_counter("partition_evictions", sm::description("total number of evicted partitions"), _stats.partition_evictions),
|
||||
sm::make_counter("partition_removals", sm::description("total number of invalidated partitions"), _stats.partition_removals),
|
||||
sm::make_counter("mispopulations", sm::description("number of entries not inserted by reads"), _stats.mispopulations),
|
||||
sm::make_gauge("partitions", sm::description("total number of cached partitions"), _stats.partitions),
|
||||
sm::make_gauge("rows", sm::description("total number of cached rows"), _stats.rows),
|
||||
sm::make_derive("reads", sm::description("number of started reads"), _stats.reads),
|
||||
sm::make_derive("reads_with_misses", sm::description("number of reads which had to read from sstables"), _stats.reads_with_misses),
|
||||
sm::make_counter("reads", sm::description("number of started reads"), _stats.reads),
|
||||
sm::make_counter("reads_with_misses", sm::description("number of reads which had to read from sstables"), _stats.reads_with_misses),
|
||||
sm::make_gauge("active_reads", sm::description("number of currently active reads"), [this] { return _stats.active_reads(); }),
|
||||
sm::make_derive("sstable_reader_recreations", sm::description("number of times sstable reader was recreated due to memtable flush"), _stats.underlying_recreations),
|
||||
sm::make_derive("sstable_partition_skips", sm::description("number of times sstable reader was fast forwarded across partitions"), _stats.underlying_partition_skips),
|
||||
sm::make_derive("sstable_row_skips", sm::description("number of times sstable reader was fast forwarded within a partition"), _stats.underlying_row_skips),
|
||||
sm::make_derive("pinned_dirty_memory_overload", sm::description("amount of pinned bytes that we tried to unpin over the limit. This should sit constantly at 0, and any number different than 0 is indicative of a bug"), _stats.pinned_dirty_memory_overload),
|
||||
sm::make_derive("rows_processed_from_memtable", _stats.rows_processed_from_memtable,
|
||||
sm::make_counter("sstable_reader_recreations", sm::description("number of times sstable reader was recreated due to memtable flush"), _stats.underlying_recreations),
|
||||
sm::make_counter("sstable_partition_skips", sm::description("number of times sstable reader was fast forwarded across partitions"), _stats.underlying_partition_skips),
|
||||
sm::make_counter("sstable_row_skips", sm::description("number of times sstable reader was fast forwarded within a partition"), _stats.underlying_row_skips),
|
||||
sm::make_counter("pinned_dirty_memory_overload", sm::description("amount of pinned bytes that we tried to unpin over the limit. This should sit constantly at 0, and any number different than 0 is indicative of a bug"), _stats.pinned_dirty_memory_overload),
|
||||
sm::make_counter("rows_processed_from_memtable", _stats.rows_processed_from_memtable,
|
||||
sm::description("total number of rows in memtables which were processed during cache update on memtable flush")),
|
||||
sm::make_derive("rows_dropped_from_memtable", _stats.rows_dropped_from_memtable,
|
||||
sm::make_counter("rows_dropped_from_memtable", _stats.rows_dropped_from_memtable,
|
||||
sm::description("total number of rows in memtables which were dropped during cache update on memtable flush")),
|
||||
sm::make_derive("rows_merged_from_memtable", _stats.rows_merged_from_memtable,
|
||||
sm::make_counter("rows_merged_from_memtable", _stats.rows_merged_from_memtable,
|
||||
sm::description("total number of rows in memtables which were merged with existing rows during cache update on memtable flush")),
|
||||
sm::make_derive("range_tombstone_reads", _stats.range_tombstone_reads,
|
||||
sm::make_counter("range_tombstone_reads", _stats.range_tombstone_reads,
|
||||
sm::description("total amount of range tombstones processed during read")),
|
||||
sm::make_derive("row_tombstone_reads", _stats.row_tombstone_reads,
|
||||
sm::make_counter("row_tombstone_reads", _stats.row_tombstone_reads,
|
||||
sm::description("total amount of row tombstones processed during read")),
|
||||
});
|
||||
}
|
||||
|
||||
@@ -1747,7 +1747,7 @@ void storage_proxy_stats::split_stats::register_metrics_local() {
|
||||
namespace sm = seastar::metrics;
|
||||
|
||||
_metrics.add_group(_category, {
|
||||
sm::make_derive(_short_description_prefix + sstring("_local_node"), [this] { return _local.val; },
|
||||
sm::make_counter(_short_description_prefix + sstring("_local_node"), [this] { return _local.val; },
|
||||
sm::description(_long_description_prefix + "on a local Node"), {storage_proxy_stats::current_scheduling_group_label(), op_type_label(_op_type)})
|
||||
});
|
||||
}
|
||||
@@ -1760,7 +1760,7 @@ void storage_proxy_stats::split_stats::register_metrics_for(gms::inet_address ep
|
||||
// corresponding collectd metric
|
||||
if (auto [ignored, added] = _dc_stats.try_emplace(dc); added) {
|
||||
_metrics.add_group(_category, {
|
||||
sm::make_derive(_short_description_prefix + sstring("_remote_node"), [this, dc] { return _dc_stats[dc].val; },
|
||||
sm::make_counter(_short_description_prefix + sstring("_remote_node"), [this, dc] { return _dc_stats[dc].val; },
|
||||
sm::description(seastar::format("{} when communicating with external Nodes in DC {}", _long_description_prefix, dc)), {storage_proxy_stats::current_scheduling_group_label(), datacenter_label(dc), op_type_label(_op_type)})
|
||||
});
|
||||
}
|
||||
|
||||
@@ -3053,80 +3053,80 @@ future<> init_metrics() {
|
||||
return seastar::smp::invoke_on_all([] {
|
||||
namespace sm = seastar::metrics;
|
||||
metrics.add_group("sstables", {
|
||||
sm::make_derive("index_page_hits", [] { return partition_index_cache::shard_stats().hits; },
|
||||
sm::make_counter("index_page_hits", [] { return partition_index_cache::shard_stats().hits; },
|
||||
sm::description("Index page requests which could be satisfied without waiting")),
|
||||
sm::make_derive("index_page_misses", [] { return partition_index_cache::shard_stats().misses; },
|
||||
sm::make_counter("index_page_misses", [] { return partition_index_cache::shard_stats().misses; },
|
||||
sm::description("Index page requests which initiated a read from disk")),
|
||||
sm::make_derive("index_page_blocks", [] { return partition_index_cache::shard_stats().blocks; },
|
||||
sm::make_counter("index_page_blocks", [] { return partition_index_cache::shard_stats().blocks; },
|
||||
sm::description("Index page requests which needed to wait due to page not being loaded yet")),
|
||||
sm::make_derive("index_page_evictions", [] { return partition_index_cache::shard_stats().evictions; },
|
||||
sm::make_counter("index_page_evictions", [] { return partition_index_cache::shard_stats().evictions; },
|
||||
sm::description("Index pages which got evicted from memory")),
|
||||
sm::make_derive("index_page_populations", [] { return partition_index_cache::shard_stats().populations; },
|
||||
sm::make_counter("index_page_populations", [] { return partition_index_cache::shard_stats().populations; },
|
||||
sm::description("Index pages which got populated into memory")),
|
||||
sm::make_gauge("index_page_used_bytes", [] { return partition_index_cache::shard_stats().used_bytes; },
|
||||
sm::description("Amount of bytes used by index pages in memory")),
|
||||
|
||||
sm::make_derive("index_page_cache_hits", [] { return index_page_cache_metrics.page_hits; },
|
||||
sm::make_counter("index_page_cache_hits", [] { return index_page_cache_metrics.page_hits; },
|
||||
sm::description("Index page cache requests which were served from cache")),
|
||||
sm::make_derive("index_page_cache_misses", [] { return index_page_cache_metrics.page_misses; },
|
||||
sm::make_counter("index_page_cache_misses", [] { return index_page_cache_metrics.page_misses; },
|
||||
sm::description("Index page cache requests which had to perform I/O")),
|
||||
sm::make_derive("index_page_cache_evictions", [] { return index_page_cache_metrics.page_evictions; },
|
||||
sm::make_counter("index_page_cache_evictions", [] { return index_page_cache_metrics.page_evictions; },
|
||||
sm::description("Total number of index page cache pages which have been evicted")),
|
||||
sm::make_derive("index_page_cache_populations", [] { return index_page_cache_metrics.page_populations; },
|
||||
sm::make_counter("index_page_cache_populations", [] { return index_page_cache_metrics.page_populations; },
|
||||
sm::description("Total number of index page cache pages which were inserted into the cache")),
|
||||
sm::make_gauge("index_page_cache_bytes", [] { return index_page_cache_metrics.cached_bytes; },
|
||||
sm::description("Total number of bytes cached in the index page cache")),
|
||||
sm::make_gauge("index_page_cache_bytes_in_std", [] { return index_page_cache_metrics.bytes_in_std; },
|
||||
sm::description("Total number of bytes in temporary buffers which live in the std allocator")),
|
||||
|
||||
sm::make_derive("pi_cache_hits_l0", [] { return promoted_index_cache_metrics.hits_l0; },
|
||||
sm::make_counter("pi_cache_hits_l0", [] { return promoted_index_cache_metrics.hits_l0; },
|
||||
sm::description("Number of requests for promoted index block in state l0 which didn't have to go to the page cache")),
|
||||
sm::make_derive("pi_cache_hits_l1", [] { return promoted_index_cache_metrics.hits_l1; },
|
||||
sm::make_counter("pi_cache_hits_l1", [] { return promoted_index_cache_metrics.hits_l1; },
|
||||
sm::description("Number of requests for promoted index block in state l1 which didn't have to go to the page cache")),
|
||||
sm::make_derive("pi_cache_hits_l2", [] { return promoted_index_cache_metrics.hits_l2; },
|
||||
sm::make_counter("pi_cache_hits_l2", [] { return promoted_index_cache_metrics.hits_l2; },
|
||||
sm::description("Number of requests for promoted index block in state l2 which didn't have to go to the page cache")),
|
||||
sm::make_derive("pi_cache_misses_l0", [] { return promoted_index_cache_metrics.misses_l0; },
|
||||
sm::make_counter("pi_cache_misses_l0", [] { return promoted_index_cache_metrics.misses_l0; },
|
||||
sm::description("Number of requests for promoted index block in state l0 which had to go to the page cache")),
|
||||
sm::make_derive("pi_cache_misses_l1", [] { return promoted_index_cache_metrics.misses_l1; },
|
||||
sm::make_counter("pi_cache_misses_l1", [] { return promoted_index_cache_metrics.misses_l1; },
|
||||
sm::description("Number of requests for promoted index block in state l1 which had to go to the page cache")),
|
||||
sm::make_derive("pi_cache_misses_l2", [] { return promoted_index_cache_metrics.misses_l2; },
|
||||
sm::make_counter("pi_cache_misses_l2", [] { return promoted_index_cache_metrics.misses_l2; },
|
||||
sm::description("Number of requests for promoted index block in state l2 which had to go to the page cache")),
|
||||
sm::make_derive("pi_cache_populations", [] { return promoted_index_cache_metrics.populations; },
|
||||
sm::make_counter("pi_cache_populations", [] { return promoted_index_cache_metrics.populations; },
|
||||
sm::description("Number of promoted index blocks which got inserted")),
|
||||
sm::make_derive("pi_cache_evictions", [] { return promoted_index_cache_metrics.evictions; },
|
||||
sm::make_counter("pi_cache_evictions", [] { return promoted_index_cache_metrics.evictions; },
|
||||
sm::description("Number of promoted index blocks which got evicted")),
|
||||
sm::make_gauge("pi_cache_bytes", [] { return promoted_index_cache_metrics.used_bytes; },
|
||||
sm::description("Number of bytes currently used by cached promoted index blocks")),
|
||||
sm::make_gauge("pi_cache_block_count", [] { return promoted_index_cache_metrics.block_count; },
|
||||
sm::description("Number of promoted index blocks currently cached")),
|
||||
|
||||
sm::make_derive("partition_writes", [] { return sstables_stats::get_shard_stats().partition_writes; },
|
||||
sm::make_counter("partition_writes", [] { return sstables_stats::get_shard_stats().partition_writes; },
|
||||
sm::description("Number of partitions written")),
|
||||
sm::make_derive("static_row_writes", [] { return sstables_stats::get_shard_stats().static_row_writes; },
|
||||
sm::make_counter("static_row_writes", [] { return sstables_stats::get_shard_stats().static_row_writes; },
|
||||
sm::description("Number of static rows written")),
|
||||
sm::make_derive("row_writes", [] { return sstables_stats::get_shard_stats().row_writes; },
|
||||
sm::make_counter("row_writes", [] { return sstables_stats::get_shard_stats().row_writes; },
|
||||
sm::description("Number of clustering rows written")),
|
||||
sm::make_derive("cell_writes", [] { return sstables_stats::get_shard_stats().cell_writes; },
|
||||
sm::make_counter("cell_writes", [] { return sstables_stats::get_shard_stats().cell_writes; },
|
||||
sm::description("Number of cells written")),
|
||||
sm::make_derive("tombstone_writes", [] { return sstables_stats::get_shard_stats().tombstone_writes; },
|
||||
sm::make_counter("tombstone_writes", [] { return sstables_stats::get_shard_stats().tombstone_writes; },
|
||||
sm::description("Number of tombstones written")),
|
||||
sm::make_derive("range_tombstone_writes", [] { return sstables_stats::get_shard_stats().range_tombstone_writes; },
|
||||
sm::make_counter("range_tombstone_writes", [] { return sstables_stats::get_shard_stats().range_tombstone_writes; },
|
||||
sm::description("Number of range tombstones written")),
|
||||
sm::make_derive("range_tombstone_reads", [] { return sstables_stats::get_shard_stats().range_tombstone_reads; },
|
||||
sm::make_counter("range_tombstone_reads", [] { return sstables_stats::get_shard_stats().range_tombstone_reads; },
|
||||
sm::description("Number of range tombstones read")),
|
||||
sm::make_derive("row_tombstone_reads", [] { return sstables_stats::get_shard_stats().row_tombstone_reads; },
|
||||
sm::make_counter("row_tombstone_reads", [] { return sstables_stats::get_shard_stats().row_tombstone_reads; },
|
||||
sm::description("Number of row tombstones read")),
|
||||
sm::make_derive("cell_tombstone_writes", [] { return sstables_stats::get_shard_stats().cell_tombstone_writes; },
|
||||
sm::make_counter("cell_tombstone_writes", [] { return sstables_stats::get_shard_stats().cell_tombstone_writes; },
|
||||
sm::description("Number of cell tombstones written")),
|
||||
sm::make_derive("single_partition_reads", [] { return sstables_stats::get_shard_stats().single_partition_reads; },
|
||||
sm::make_counter("single_partition_reads", [] { return sstables_stats::get_shard_stats().single_partition_reads; },
|
||||
sm::description("Number of single partition flat mutation reads")),
|
||||
sm::make_derive("range_partition_reads", [] { return sstables_stats::get_shard_stats().range_partition_reads; },
|
||||
sm::make_counter("range_partition_reads", [] { return sstables_stats::get_shard_stats().range_partition_reads; },
|
||||
sm::description("Number of partition range flat mutation reads")),
|
||||
sm::make_derive("partition_reads", [] { return sstables_stats::get_shard_stats().partition_reads; },
|
||||
sm::make_counter("partition_reads", [] { return sstables_stats::get_shard_stats().partition_reads; },
|
||||
sm::description("Number of partitions read")),
|
||||
sm::make_derive("partition_seeks", [] { return sstables_stats::get_shard_stats().partition_seeks; },
|
||||
sm::make_counter("partition_seeks", [] { return sstables_stats::get_shard_stats().partition_seeks; },
|
||||
sm::description("Number of partitions seeked")),
|
||||
sm::make_derive("row_reads", [] { return sstables_stats::get_shard_stats().row_reads; },
|
||||
sm::make_counter("row_reads", [] { return sstables_stats::get_shard_stats().row_reads; },
|
||||
sm::description("Number of rows read")),
|
||||
|
||||
sm::make_counter("capped_local_deletion_time", [] { return sstables_stats::get_shard_stats().capped_local_deletion_time; },
|
||||
@@ -3134,9 +3134,9 @@ future<> init_metrics() {
|
||||
sm::make_counter("capped_tombstone_deletion_time", [] { return sstables_stats::get_shard_stats().capped_tombstone_deletion_time; },
|
||||
sm::description("Was partition tombstone deletion time capped at maximum allowed value")),
|
||||
|
||||
sm::make_derive("total_open_for_reading", [] { return sstables_stats::get_shard_stats().open_for_reading; },
|
||||
sm::make_counter("total_open_for_reading", [] { return sstables_stats::get_shard_stats().open_for_reading; },
|
||||
sm::description("Counter of sstables open for reading")),
|
||||
sm::make_derive("total_open_for_writing", [] { return sstables_stats::get_shard_stats().open_for_writing; },
|
||||
sm::make_counter("total_open_for_writing", [] { return sstables_stats::get_shard_stats().open_for_writing; },
|
||||
sm::description("Counter of sstables open for writing")),
|
||||
|
||||
sm::make_gauge("currently_open_for_reading", [] {
|
||||
@@ -3148,7 +3148,7 @@ future<> init_metrics() {
|
||||
sstables_stats::get_shard_stats().closed_for_writing;
|
||||
}, sm::description("Number of sstables currently open for writing")),
|
||||
|
||||
sm::make_derive("total_deleted", [] { return sstables_stats::get_shard_stats().deleted; },
|
||||
sm::make_counter("total_deleted", [] { return sstables_stats::get_shard_stats().deleted; },
|
||||
sm::description("Counter of deleted sstables")),
|
||||
|
||||
sm::make_gauge("bloom_filter_memory_size", [] { return utils::filter::bloom_filter::get_shard_stats().memory_size; },
|
||||
|
||||
@@ -37,10 +37,10 @@ stream_manager::stream_manager(sharded<replica::database>& db,
|
||||
namespace sm = seastar::metrics;
|
||||
|
||||
_metrics.add_group("streaming", {
|
||||
sm::make_derive("total_incoming_bytes", [this] { return _total_incoming_bytes; },
|
||||
sm::make_counter("total_incoming_bytes", [this] { return _total_incoming_bytes; },
|
||||
sm::description("Total number of bytes received on this shard.")),
|
||||
|
||||
sm::make_derive("total_outgoing_bytes", [this] { return _total_outgoing_bytes; },
|
||||
sm::make_counter("total_outgoing_bytes", [this] { return _total_outgoing_bytes; },
|
||||
sm::description("Total number of bytes sent on this shard.")),
|
||||
});
|
||||
}
|
||||
|
||||
@@ -340,13 +340,13 @@ thrift_stats::thrift_stats(thrift_server& server) {
|
||||
namespace sm = seastar::metrics;
|
||||
|
||||
_metrics.add_group("thrift", {
|
||||
sm::make_derive("thrift-connections", [&server] { return server.total_connections(); },
|
||||
sm::make_counter("thrift-connections", [&server] { return server.total_connections(); },
|
||||
sm::description("Rate of creation of new Thrift connections.")),
|
||||
|
||||
sm::make_gauge("current_connections", [&server] { return server.current_connections(); },
|
||||
sm::description("Holds a current number of opened Thrift connections.")),
|
||||
|
||||
sm::make_derive("served", [&server] { return server.requests_served(); },
|
||||
sm::make_counter("served", [&server] { return server.requests_served(); },
|
||||
sm::description("Rate of serving Thrift requests.")),
|
||||
sm::make_gauge("serving", [&server] { return server.requests_serving(); },
|
||||
sm::description("Number of Thrift requests being currently served.")),
|
||||
@@ -354,11 +354,11 @@ thrift_stats::thrift_stats(thrift_server& server) {
|
||||
sm::description(
|
||||
seastar::format("Holds the number of Thrift requests that are currently blocked due to reaching the memory quota limit ({}B). "
|
||||
"Non-zero value indicates that our bottleneck is memory and more specifically - the memory quota allocated for the \"Thrift transport\" component.", server.max_request_size()))),
|
||||
sm::make_derive("requests_blocked_memory", [&server] { return server.requests_blocked_memory(); },
|
||||
sm::make_counter("requests_blocked_memory", [&server] { return server.requests_blocked_memory(); },
|
||||
sm::description(
|
||||
seastar::format("Holds an incrementing counter with the Thrift requests that ever blocked due to reaching the memory quota limit ({}B). "
|
||||
"The first derivative of this value shows how often we block due to memory exhaustion in the \"Thrift transport\" component.", server.max_request_size()))),
|
||||
sm::make_derive("requests_shed", [&server] { return server.requests_shed(); },
|
||||
sm::make_counter("requests_shed", [&server] { return server.requests_shed(); },
|
||||
sm::description("Holds an incrementing counter with the requests that were shed due to exceeding the threshold configured via max_concurrent_requests_per_shard. "
|
||||
"The first derivative of this value shows how often we shed requests due to exceeding the limit in the \"Thrift transport\" component.")),
|
||||
sm::make_gauge("requests_memory_available", [&server] { return server.memory_available().current(); },
|
||||
|
||||
@@ -196,11 +196,11 @@ trace_keyspace_helper::trace_keyspace_helper(tracing& tr)
|
||||
namespace sm = seastar::metrics;
|
||||
|
||||
_metrics.add_group("tracing_keyspace_helper", {
|
||||
sm::make_derive("tracing_errors", [this] { return _stats.tracing_errors; },
|
||||
sm::make_counter("tracing_errors", [this] { return _stats.tracing_errors; },
|
||||
sm::description("Counts a number of errors during writing to a system_traces keyspace. "
|
||||
"One error may cause one or more tracing records to be lost.")),
|
||||
|
||||
sm::make_derive("bad_column_family_errors", [this] { return _stats.bad_column_family_errors; },
|
||||
sm::make_counter("bad_column_family_errors", [this] { return _stats.bad_column_family_errors; },
|
||||
sm::description("Counts a number of times write failed due to one of the tables in the system_traces keyspace has an incompatible schema. "
|
||||
"One error may result one or more tracing records to be lost. "
|
||||
"Non-zero value indicates that the administrator has to take immediate steps to fix the corresponding schema. "
|
||||
|
||||
@@ -36,18 +36,18 @@ tracing::tracing(const backend_registry& br, sstring tracing_backend_helper_clas
|
||||
namespace sm = seastar::metrics;
|
||||
|
||||
_metrics.add_group("tracing", {
|
||||
sm::make_derive("dropped_sessions", stats.dropped_sessions,
|
||||
sm::make_counter("dropped_sessions", stats.dropped_sessions,
|
||||
sm::description("Counts a number of dropped sessions due to too many pending sessions/records. "
|
||||
"High value indicates that backend is saturated with the rate with which new tracing records are created.")),
|
||||
|
||||
sm::make_derive("dropped_records", stats.dropped_records,
|
||||
sm::make_counter("dropped_records", stats.dropped_records,
|
||||
sm::description("Counts a number of dropped records due to too many pending records. "
|
||||
"High value indicates that backend is saturated with the rate with which new tracing records are created.")),
|
||||
|
||||
sm::make_derive("trace_records_count", stats.trace_records_count,
|
||||
sm::make_counter("trace_records_count", stats.trace_records_count,
|
||||
sm::description("This metric is a rate of tracing records generation.")),
|
||||
|
||||
sm::make_derive("trace_errors", stats.trace_errors,
|
||||
sm::make_counter("trace_errors", stats.trace_errors,
|
||||
sm::description("Counts a number of trace records dropped due to an error (e.g. OOM).")),
|
||||
|
||||
sm::make_gauge("active_sessions", _active_sessions,
|
||||
|
||||
@@ -161,37 +161,37 @@ cql_server::cql_server(distributed<cql3::query_processor>& qp, auth::service& au
|
||||
namespace sm = seastar::metrics;
|
||||
|
||||
auto ls = {
|
||||
sm::make_derive("startups", _stats.startups,
|
||||
sm::make_counter("startups", _stats.startups,
|
||||
sm::description("Counts the total number of received CQL STARTUP messages.")),
|
||||
|
||||
sm::make_derive("auth_responses", _stats.auth_responses,
|
||||
sm::make_counter("auth_responses", _stats.auth_responses,
|
||||
sm::description("Counts the total number of received CQL AUTH messages.")),
|
||||
|
||||
sm::make_derive("options_requests", _stats.options_requests,
|
||||
sm::make_counter("options_requests", _stats.options_requests,
|
||||
sm::description("Counts the total number of received CQL OPTIONS messages.")),
|
||||
|
||||
sm::make_derive("query_requests", _stats.query_requests,
|
||||
sm::make_counter("query_requests", _stats.query_requests,
|
||||
sm::description("Counts the total number of received CQL QUERY messages.")),
|
||||
|
||||
sm::make_derive("prepare_requests", _stats.prepare_requests,
|
||||
sm::make_counter("prepare_requests", _stats.prepare_requests,
|
||||
sm::description("Counts the total number of received CQL PREPARE messages.")),
|
||||
|
||||
sm::make_derive("execute_requests", _stats.execute_requests,
|
||||
sm::make_counter("execute_requests", _stats.execute_requests,
|
||||
sm::description("Counts the total number of received CQL EXECUTE messages.")),
|
||||
|
||||
sm::make_derive("batch_requests", _stats.batch_requests,
|
||||
sm::make_counter("batch_requests", _stats.batch_requests,
|
||||
sm::description("Counts the total number of received CQL BATCH messages.")),
|
||||
|
||||
sm::make_derive("register_requests", _stats.register_requests,
|
||||
sm::make_counter("register_requests", _stats.register_requests,
|
||||
sm::description("Counts the total number of received CQL REGISTER messages.")),
|
||||
|
||||
sm::make_derive("cql-connections", _stats.connects,
|
||||
sm::make_counter("cql-connections", _stats.connects,
|
||||
sm::description("Counts a number of client connections.")),
|
||||
|
||||
sm::make_gauge("current_connections", _stats.connections,
|
||||
sm::description("Holds a current number of client connections.")),
|
||||
|
||||
sm::make_derive("requests_served", _stats.requests_served,
|
||||
sm::make_counter("requests_served", _stats.requests_served,
|
||||
sm::description("Counts a number of served requests.")),
|
||||
|
||||
sm::make_gauge("requests_serving", _stats.requests_serving,
|
||||
@@ -201,11 +201,11 @@ cql_server::cql_server(distributed<cql3::query_processor>& qp, auth::service& au
|
||||
sm::description(
|
||||
seastar::format("Holds the number of requests that are currently blocked due to reaching the memory quota limit ({}B). "
|
||||
"Non-zero value indicates that our bottleneck is memory and more specifically - the memory quota allocated for the \"CQL transport\" component.", _max_request_size))),
|
||||
sm::make_derive("requests_blocked_memory", _stats.requests_blocked_memory,
|
||||
sm::make_counter("requests_blocked_memory", _stats.requests_blocked_memory,
|
||||
sm::description(
|
||||
seastar::format("Holds an incrementing counter with the requests that ever blocked due to reaching the memory quota limit ({}B). "
|
||||
"The first derivative of this value shows how often we block due to memory exhaustion in the \"CQL transport\" component.", _max_request_size))),
|
||||
sm::make_derive("requests_shed", _stats.requests_shed,
|
||||
sm::make_counter("requests_shed", _stats.requests_shed,
|
||||
sm::description("Holds an incrementing counter with the requests that were shed due to overload (threshold configured via max_concurrent_requests_per_shard). "
|
||||
"The first derivative of this value shows how often we shed requests due to overload in the \"CQL transport\" component.")),
|
||||
sm::make_gauge("requests_memory_available", [this] { return _memory_available.current(); },
|
||||
@@ -225,7 +225,7 @@ cql_server::cql_server(distributed<cql3::query_processor>& qp, auth::service& au
|
||||
auto label_instance = cql_error_label(e.second);
|
||||
|
||||
transport_metrics.emplace_back(
|
||||
sm::make_derive("cql_errors_total", sm::description("Counts the total number of returned CQL errors."),
|
||||
sm::make_counter("cql_errors_total", sm::description("Counts the total number of returned CQL errors."),
|
||||
{label_instance},
|
||||
[this, code = e.first] { auto it = _stats.errors.find(code); return it != _stats.errors.end() ? it->second : 0; })
|
||||
);
|
||||
|
||||
@@ -2451,19 +2451,19 @@ tracker::impl::impl() {
|
||||
sm::make_gauge("occupancy", [this] { return region_occupancy().used_fraction() * 100; },
|
||||
sm::description("Holds a current portion (in percents) of the used memory.")),
|
||||
|
||||
sm::make_derive("segments_compacted", [] { return shard_segment_pool.statistics().segments_compacted; },
|
||||
sm::make_counter("segments_compacted", [] { return shard_segment_pool.statistics().segments_compacted; },
|
||||
sm::description("Counts a number of compacted segments.")),
|
||||
|
||||
sm::make_derive("memory_compacted", [] { return shard_segment_pool.statistics().memory_compacted; },
|
||||
sm::make_counter("memory_compacted", [] { return shard_segment_pool.statistics().memory_compacted; },
|
||||
sm::description("Counts number of bytes which were copied as part of segment compaction.")),
|
||||
|
||||
sm::make_derive("memory_allocated", [] { return shard_segment_pool.statistics().memory_allocated; },
|
||||
sm::make_counter("memory_allocated", [] { return shard_segment_pool.statistics().memory_allocated; },
|
||||
sm::description("Counts number of bytes which were requested from LSA.")),
|
||||
|
||||
sm::make_derive("memory_evicted", [] { return shard_segment_pool.statistics().memory_evicted; },
|
||||
sm::make_counter("memory_evicted", [] { return shard_segment_pool.statistics().memory_evicted; },
|
||||
sm::description("Counts number of bytes which were evicted.")),
|
||||
|
||||
sm::make_derive("memory_freed", [] { return shard_segment_pool.statistics().memory_freed; },
|
||||
sm::make_counter("memory_freed", [] { return shard_segment_pool.statistics().memory_freed; },
|
||||
sm::description("Counts number of bytes which were requested to be freed in LSA.")),
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user