#include <userver/utils/statistics/storage.hpp>
Storage of metrics, usually retrieved from components::StatisticsStorage.
See utils::statistics::Writer for an information on how to write metrics.
Definition at line 120 of file storage.hpp.
Public Member Functions | |
| Storage (const Storage &)=delete | |
| formats::json::Value | GetAsJson () const |
| void | VisitMetrics (BaseFormatBuilder &out, const Request &request={}) const |
Visits all the metrics and calls out.HandleMetric for each metric. | |
| Entry | RegisterWriter (std::string common_prefix, WriterFunc func, std::vector< Label > add_labels={}) |
Add a writer function. Note that func is called concurrently with other code, so it should be thread-safe. | |
| Entry | RegisterExtender (std::string prefix, ExtenderFunc func) |
| void | UnregisterExtender (impl::StorageIterator iterator, impl::UnregisteringKind kind) noexcept |
| formats::json::Value utils::statistics::Storage::GetAsJson | ( | ) | const |
Creates new Json::Value and calls every deprecated registered extender func over it.
| Entry utils::statistics::Storage::RegisterExtender | ( | std::string | prefix, |
| ExtenderFunc | func ) |