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:

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 ()
 
virtual ComponentHealth GetComponentHealth () const
 
virtual void OnLoadingCancelled ()
 
virtual void OnAllComponentsAreStopping ()
 

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

◆ GetComponentHealth()

virtual ComponentHealth components::RawComponentBase::GetComponentHealth ( ) const
inlinevirtualinherited

Reimplemented in components::ComponentBase, and server::handlers::Restart.

Definition at line 49 of file raw_component_base.hpp.

◆ GetMetricsStorage()

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

◆ GetStorage() [1/2]

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

Definition at line 44 of file statistics_storage.hpp.

◆ GetStorage() [2/2]

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

Definition at line 46 of file statistics_storage.hpp.

◆ OnAllComponentsAreStopping()

virtual void components::RawComponentBase::OnAllComponentsAreStopping ( )
inlinevirtualinherited

◆ OnAllComponentsLoaded()

void components::StatisticsStorage::OnAllComponentsLoaded ( )
overridevirtual

Reimplemented from components::RawComponentBase.

◆ OnLoadingCancelled()

virtual void components::RawComponentBase::OnLoadingCancelled ( )
inlinevirtualinherited

Reimplemented in components::ComponentBase.

Definition at line 51 of file raw_component_base.hpp.


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