6 #ifndef KAGOME_CORE_METRICS_IMPL_PROMETHEUS_HANDLER_IMPL_HPP 7 #define KAGOME_CORE_METRICS_IMPL_PROMETHEUS_HANDLER_IMPL_HPP 11 #include <string_view> 13 #include <prometheus/collectable.h> 27 std::shared_ptr<Session> session)
override;
31 const std::weak_ptr<prometheus::Collectable> &collectable);
33 const std::weak_ptr<prometheus::Collectable> &collectable);
35 std::vector<std::weak_ptr<prometheus::Collectable>> &collectables);
38 const std::string &body);
48 #endif // KAGOME_CORE_METRICS_IMPL_HANDLER_IMPL_HPP
an interface to add request handler for metrics::Exposer implementation generally will contain metric...
std::size_t writeResponse(std::shared_ptr< Session > session, Session::Request request, const std::string &body)
boost::beast::http::request< Body > Request
std::mutex collectables_mutex_
std::vector< std::weak_ptr< prometheus::Collectable > > collectables_
void removeCollectable(const std::weak_ptr< prometheus::Collectable > &collectable)
std::shared_ptr< soralog::Logger > Logger
~PrometheusHandler() override=default
void onSessionRequest(Session::Request request, std::shared_ptr< Session > session) override
main interface for session request handling
void registerCollectable(Registry ®istry) override
registers general type metrics registry for metrics collection
static void cleanupStalePointers(std::vector< std::weak_ptr< prometheus::Collectable >> &collectables)
the class stores metrics, provides interface to create metrics and families of metrics TODO(sanblch) ...