From 9cc44c0eb702e53e842dadf8b707f513ba3fa332 Mon Sep 17 00:00:00 2001 From: Samuel Gaist Date: Wed, 10 Apr 2024 14:27:36 +0200 Subject: [PATCH] doc(falco_metrics): add basic documentation Signed-off-by: Samuel Gaist --- userspace/falco/falco_metrics.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/userspace/falco/falco_metrics.cpp b/userspace/falco/falco_metrics.cpp index 10cb9371..198153f2 100644 --- a/userspace/falco/falco_metrics.cpp +++ b/userspace/falco/falco_metrics.cpp @@ -21,6 +21,15 @@ limitations under the License. #include +/*! + \class falco_metrics + \brief This class is used to convert the metrics provided by the application + and falco libs into a string to be return by the metrics endpoint. +*/ + +/*! + \brief Constructor that takes a \c state object to build its internal state +*/ falco_metrics::falco_metrics(falco::app::state& state) { falco_configuration::webserver_config webserver_config = state.config->m_webserver_config; @@ -37,6 +46,11 @@ falco_metrics::falco_metrics(falco::app::state& state) } } +/*! + \brief This method returns a textual representation of the metrics configured. + + The current implementation returns a Prometheus exposition formatted string. +*/ std::string falco_metrics::to_text() const { if (!m_metrics_enabled)