![]() |
LogIt++
Header-only, macro-first C++ logging library
|
Convenience helpers for constructing Prometheus metric families and samples. More...
Go to the source code of this file.
Namespaces | |
| namespace | logit |
| The primary namespace for the LogIt++ library. | |
Macros | |
| #define | LOGIT_CPP_HEADER_LOGIT_CPP_LOGIT_LOGGERS_PROMETHEUS_PROMETHEUSMETRICBUILDERS_HPP_INCLUDED |
Functions | |
| PrometheusLabel | logit::make_prometheus_label (const std::string &name, const std::string &value) |
| Create a single label pair. | |
| PrometheusSample | logit::make_prometheus_sample (const std::string &name, double value, std::vector< PrometheusLabel > labels={}, int64_t timestamp_ms=0) |
| Create a sample for a Prometheus metric family. | |
| PrometheusMetricFamily | logit::make_prometheus_counter (const std::string &name, const std::string &help, double value) |
| Create a Counter metric family with one unlabeled sample. | |
| PrometheusMetricFamily | logit::make_prometheus_counter (const std::string &name, const std::string &help, double value, std::vector< PrometheusLabel > labels) |
| Create a Counter metric family with one labeled sample. | |
| PrometheusMetricFamily | logit::make_prometheus_gauge (const std::string &name, const std::string &help, double value) |
| Create a Gauge metric family with one unlabeled sample. | |
| PrometheusMetricFamily | logit::make_prometheus_gauge (const std::string &name, const std::string &help, double value, std::vector< PrometheusLabel > labels) |
| Create a Gauge metric family with one labeled sample. | |
| PrometheusMetricFamily | logit::make_prometheus_untyped (const std::string &name, const std::string &help, double value) |
| Create an Untyped metric family with one unlabeled sample. | |
| PrometheusMetricFamily | logit::make_prometheus_untyped (const std::string &name, const std::string &help, double value, std::vector< PrometheusLabel > labels) |
| Create an Untyped metric family with one labeled sample. | |
| void | logit::add_prometheus_counter (std::vector< PrometheusMetricFamily > &families, const std::string &name, const std::string &help, double value, std::vector< PrometheusLabel > labels={}) |
| Append a Counter metric family to the families vector (convenience for on_collect). | |
| void | logit::add_prometheus_gauge (std::vector< PrometheusMetricFamily > &families, const std::string &name, const std::string &help, double value, std::vector< PrometheusLabel > labels={}) |
| Append a Gauge metric family to the families vector (convenience for on_collect). | |
| void | logit::add_prometheus_untyped (std::vector< PrometheusMetricFamily > &families, const std::string &name, const std::string &help, double value, std::vector< PrometheusLabel > labels={}) |
| Append an Untyped metric family to the families vector (convenience for on_collect). | |
Convenience helpers for constructing Prometheus metric families and samples.
Definition in file PrometheusMetricBuilders.hpp.
| #define LOGIT_CPP_HEADER_LOGIT_CPP_LOGIT_LOGGERS_PROMETHEUS_PROMETHEUSMETRICBUILDERS_HPP_INCLUDED |
Definition at line 3 of file PrometheusMetricBuilders.hpp.