Skip to content

Commit

Permalink
Merge pull request #5434 from VladLazar/infra-metrics
Browse files Browse the repository at this point in the history
metrics: replicate selected seastar metrics
  • Loading branch information
Vlad Lazar committed Jul 13, 2022
2 parents ab7e752 + 9179aee commit c004cb8
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/v/redpanda/application.cc
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@
#include "redpanda/admin_server.h"
#include "resource_mgmt/io_priority.h"
#include "rpc/simple_protocol.h"
#include "ssx/metrics.h"
#include "storage/backlog_controller.h"
#include "storage/chunk_cache.h"
#include "storage/compaction_controller.h"
Expand Down Expand Up @@ -313,6 +314,16 @@ void application::initialize(
}

void application::setup_metrics() {
if (!config::shard_local_cfg().disable_public_metrics()) {
seastar::metrics::replicate_metric_families(
seastar::metrics::default_handle(),
{{"io_queue_total_read_ops", ssx::metrics::public_metrics_handle},
{"io_queue_total_write_ops", ssx::metrics::public_metrics_handle},
{"memory_allocated_memory", ssx::metrics::public_metrics_handle},
{"memory_free_memory", ssx::metrics::public_metrics_handle}})
.get();
}

if (config::shard_local_cfg().disable_metrics()) {
return;
}
Expand Down

0 comments on commit c004cb8

Please sign in to comment.