#include <userver/utils/statistics/metric_tag.hpp>
Metric description.
Use MetricTag<Metric>
for declarative style of metric registration and call MetricStorage::GetMetric
for accessing metric data. Please note that metrics can be accessed from multiple coroutines, so Metric
must be thread-safe (e.g. std::atomic<T>, rcu::Variable<T>, rcu::RcuMap<T>, concurrent::Variable<T>, etc.).
A custom metric type must be default-constructible and have the following free function defined:
Definition at line 27 of file metric_tag.hpp.
Public Member Functions | |
template<typename... Args> | |
MetricTag (const std::string &path, Args &&... args) | |
Register metric, passing a copy of args to the constructor of Metric | |
std::string | GetPath () const |
|
inlineexplicit |
Register metric, passing a copy of args
to the constructor of Metric
Definition at line 31 of file metric_tag.hpp.
|
inline |
Definition at line 35 of file metric_tag.hpp.
|
friend |
Definition at line 38 of file metric_tag.hpp.