6 #ifndef IROHA_MAINTENANCE_METRICS_HPP 7 #define IROHA_MAINTENANCE_METRICS_HPP 9 #include <prometheus/exposer.h> 10 #include <prometheus/registry.h> 25 class Metrics :
public std::enable_shared_from_this<Metrics> {
29 using BlockPtr = std::shared_ptr<const shared_model::interface::Block>;
32 std::string listen_addr_port_;
33 std::shared_ptr<prometheus::Exposer> exposer_;
34 std::shared_ptr<prometheus::Registry> registry_;
35 std::shared_ptr<iroha::ametsuchi::Storage> storage_;
36 std::shared_ptr<BlockSubscriber> block_subscriber_;
37 std::shared_ptr<OnProposalSubscription> on_proposal_subscription_;
40 Metrics(std::string
const &listen_addr,
41 std::shared_ptr<iroha::ametsuchi::Storage> storage,
46 return listen_addr_port_;
49 template <
class... Ts>
50 static std::shared_ptr<Metrics>
create(Ts &&... args) {
52 Resolver(Ts &&... args) :
Metrics(std::forward<Ts>(args)...) {}
54 return std::make_shared<Resolver>(std::forward<Ts>(args)...);
58 #endif // IROHA_MAINTENANCE_METRICS_HPP Definition: subscription_fwd.hpp:70
static std::shared_ptr< Metrics > create(Ts &&... args)
Definition: metrics.hpp:50
std::shared_ptr< Logger > LoggerPtr
Definition: logger_fwd.hpp:22
Definition: metrics.hpp:25
Definition: ordering_gate_common.hpp:27
Definition: dummy_logger.hpp:11
std::string const & getListenAddress() const
Definition: metrics.hpp:45