From 2267de21e6e039f314136871be96ecf67f206224 Mon Sep 17 00:00:00 2001 From: Tim Wojtulewicz Date: Mon, 8 Apr 2024 12:50:15 -0700 Subject: [PATCH] Add GetRegistry() method for retrieving access to prometheus-cpp registry --- src/telemetry/Manager.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/telemetry/Manager.h b/src/telemetry/Manager.h index c235e74a43..a060d23271 100644 --- a/src/telemetry/Manager.h +++ b/src/telemetry/Manager.h @@ -341,6 +341,13 @@ public: */ std::string GetClusterJson() const; + /** + * @return The pointer to the prometheus-cpp registry used by the telemetry + * manager. This is public so that third parties (such as broker) can add + * elements to it directly. + */ + std::shared_ptr GetRegistry() const { return prometheus_registry; } + protected: template static auto WithLabelNames(Span xs, F continuation) {