userver: userver/components/statistics_storage.hpp File Reference
Loading...
Searching...
No Matches
statistics_storage.hpp File Reference

Detailed Description

Component that keeps a utils::statistics::Storage storage for metrics.

Definition in file statistics_storage.hpp.

Go to the source code of this file.

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
 General-purpose utilities used across userver libraries.
 
namespace  utils::statistics
 Statistics writers, metric types, and histogram helpers.
 

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