#include <userver/utils/statistics/metrics_storage.hpp>
Storage of metrics registered with MetricTag<Metric>.
Definition at line 28 of file metrics_storage.hpp.
Public Member Functions | |
| MetricsStorage () | |
| Creates MetricStorage that considers all MetricTag<Metric> instances. | |
| MetricsStorage (const std::optional< std::vector< std::string > > &allowed_metric_paths) | |
| Creates MetricStorage that considers only MetricTag<Metric> instances whose paths are listed in allowed_metric_paths. If allowed_metric_paths equals std::nullopt, then all MetricTag<Metric> instances considered. | |
| MetricsStorage (const MetricsStorage &)=delete | |
| MetricsStorage (MetricsStorage &&other) noexcept | |
| MetricsStorage & | operator= (const MetricsStorage &)=delete |
| MetricsStorage & | operator= (MetricsStorage &&other) noexcept |
| template<typename Metric> | |
| Metric & | GetMetric (const MetricTag< Metric > &tag) |
| Get metric data by type. | |
| void | ResetMetrics () |
|
explicit |
|
inline |
Get metric data by type.
Definition at line 48 of file metrics_storage.hpp.
|
friend |
Dumps all the metrics of storage through writer, each under its MetricTag path.
Makes MetricsStorage satisfy utils::statistics::HasWriterSupport, so it can be passed directly to utils::statistics::Snapshot.