Component that keeps a utils::statistics::Storage storage for metrics.
Definition in file statistics_storage.hpp.
Go to the source code of this file.
#include <userver/components/component_fwd.hpp>#include <userver/components/raw_component_base.hpp>#include <userver/utils/statistics/metrics_storage.hpp>#include <userver/utils/statistics/storage.hpp>Classes | |
| class | components::StatisticsStorage |
| Component that keeps a utils::statistics::Storage storage for metrics. More... | |
Namespaces | |
| namespace | components |
| Contains functions and types to start a userver based service/tool. | |
| namespace | utils |
| Utilities. | |
Functions | |
| void | utils::statistics::RegisterWriterScope (const components::ComponentContext &, std::string common_prefix, WriterFunc func, std::vector< Label > add_labels={}) |
| Add a writer function to Storage from components::StatisticsStorage. It automatically calls utils::statistics::Storage::RegisterWriter() just after the component construction and utils::statistics::Entry::Unregister() just before the component destructor. | |
Variables | |
| template<> | |
| constexpr bool | components::kHasValidate< StatisticsStorage > = true |
| template<> | |
| constexpr auto | components::kConfigFileMode< StatisticsStorage > = ConfigFileMode::kNotRequired |
| void utils::statistics::RegisterWriterScope | ( | const components::ComponentContext & | , |
| std::string | common_prefix, | ||
| WriterFunc | func, | ||
| std::vector< Label > | add_labels = {} ) |
Add a writer function to Storage from components::StatisticsStorage. It automatically calls utils::statistics::Storage::RegisterWriter() just after the component construction and utils::statistics::Entry::Unregister() just before the component destructor.