Commit 4dc03681 authored by Dominik Charousset's avatar Dominik Charousset

Rename getter for the metrics registry

parent 515c1459
...@@ -230,14 +230,14 @@ public: ...@@ -230,14 +230,14 @@ public:
return assignable(xs, message_types<T>()); return assignable(xs, message_types<T>());
} }
/// Returns the telemetry registry for this system. /// Returns the metrics registry for this system.
telemetry::metric_registry& telemetry() noexcept { telemetry::metric_registry& metrics() noexcept {
return telemetry_; return metrics_;
} }
/// Returns the telemetry registry for this system. /// Returns the metrics registry for this system.
const telemetry::metric_registry& telemetry() const noexcept { const telemetry::metric_registry& metrics() const noexcept {
return telemetry_; return metrics_;
} }
/// Returns the host-local identifier for this system. /// Returns the host-local identifier for this system.
...@@ -600,7 +600,7 @@ private: ...@@ -600,7 +600,7 @@ private:
// -- member variables ------------------------------------------------------- // -- member variables -------------------------------------------------------
/// Manages all metrics collected by the system. /// Manages all metrics collected by the system.
telemetry::metric_registry telemetry_; telemetry::metric_registry metrics_;
/// Provides system-wide callbacks for several actor operations. /// Provides system-wide callbacks for several actor operations.
actor_profiler* profiler_; actor_profiler* profiler_;
......
...@@ -49,7 +49,7 @@ actor_registry::~actor_registry() { ...@@ -49,7 +49,7 @@ actor_registry::~actor_registry() {
} }
actor_registry::actor_registry(actor_system& sys) : system_(sys) { actor_registry::actor_registry(actor_system& sys) : system_(sys) {
running_ = sys.telemetry().gauge_singleton( running_ = sys.metrics().gauge_singleton(
"caf", "running-actors", "Number of currently running actors."); "caf", "running-actors", "Number of currently running actors.");
} }
......
...@@ -191,7 +191,7 @@ prometheus_broker::prometheus_broker(actor_config& cfg) : io::broker(cfg) { ...@@ -191,7 +191,7 @@ prometheus_broker::prometheus_broker(actor_config& cfg) : io::broker(cfg) {
#ifdef HAS_PROCESS_METRICS #ifdef HAS_PROCESS_METRICS
using telemetry::dbl_gauge; using telemetry::dbl_gauge;
using telemetry::int_gauge; using telemetry::int_gauge;
auto& reg = system().telemetry(); auto& reg = system().metrics();
cpu_time_ = reg.gauge_singleton<double>( cpu_time_ = reg.gauge_singleton<double>(
"process", "cpu", "Total user and system CPU time spent.", "seconds", true); "process", "cpu", "Total user and system CPU time spent.", "seconds", true);
mem_size_ = reg.gauge_singleton("process", "resident_memory", mem_size_ = reg.gauge_singleton("process", "resident_memory",
...@@ -249,7 +249,7 @@ behavior prometheus_broker::make_behavior() { ...@@ -249,7 +249,7 @@ behavior prometheus_broker::make_behavior() {
// Collect metrics, ship response, and close. // Collect metrics, ship response, and close.
scrape(); scrape();
auto hdr = as_bytes(make_span(request_ok)); auto hdr = as_bytes(make_span(request_ok));
auto text = collector_.collect_from(system().telemetry()); auto text = collector_.collect_from(system().metrics());
auto payload = as_bytes(make_span(text)); auto payload = as_bytes(make_span(text));
auto& dst = wr_buf(msg.handle); auto& dst = wr_buf(msg.handle);
dst.insert(dst.end(), hdr.begin(), hdr.end()); dst.insert(dst.end(), hdr.begin(), hdr.end());
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment