userver: components::StatisticsStorage Class Reference
Loading...
Searching...
No Matches
components::StatisticsStorage Class Referencefinal

#include <userver/components/statistics_storage.hpp>

Detailed Description

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

Returned references to utils::statistics::Storage live for a lifetime of the component and are safe for concurrent use.

The component does not have any options for service config.

Static configuration example:

# yaml
statistics-storage:
# Nothing
Examples
samples/testsuite-support/src/metrics.cpp.

Definition at line 32 of file statistics_storage.hpp.

+ Inheritance diagram for components::StatisticsStorage:
+ Collaboration diagram for components::StatisticsStorage:

Public Member Functions

 StatisticsStorage (const ComponentConfig &config, const ComponentContext &context)
 
void OnAllComponentsLoaded () override
 
utils::statistics::StorageGetStorage ()
 
const utils::statistics::StorageGetStorage () const
 
utils::statistics::MetricsStoragePtr GetMetricsStorage ()
 

Static Public Member Functions

static yaml_config::Schema GetStaticConfigSchema ()
 

Static Public Attributes

static constexpr std::string_view kName = "statistics-storage"
 The default name of components::StatisticsStorage component.
 

Member Function Documentation

◆ GetMetricsStorage()

utils::statistics::MetricsStoragePtr components::StatisticsStorage::GetMetricsStorage ( )
inline

◆ GetStorage() [1/2]

utils::statistics::Storage & components::StatisticsStorage::GetStorage ( )
inline

Definition at line 45 of file statistics_storage.hpp.

◆ GetStorage() [2/2]

const utils::statistics::Storage & components::StatisticsStorage::GetStorage ( ) const
inline

Definition at line 47 of file statistics_storage.hpp.


The documentation for this class was generated from the following file: