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={})
 Registers a writer in the default components::StatisticsStorage. Call this helper in the component constructor. Registration is deferred until the complete component, including derived classes, has been constructed. The callback is unregistered before the component destructor starts. The callback may run concurrently with other code and must be thread-safe.

Variables

template<>
constexpr bool components::kHasValidate< StatisticsStorage > = true
template<>
constexpr auto components::kConfigFileMode< StatisticsStorage > = ConfigFileMode::kNotRequired