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 27 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 ()
utils::statistics::MetricsStorageGetMetricsStorageRef ()
virtual ComponentHealth GetComponentHealth () const
virtual void OnLoadingCancelled ()
virtual void OnGracefulShutdown (engine::Deadline)
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

◆ GetMetricsStorage()

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

◆ GetMetricsStorageRef()

utils::statistics::MetricsStorage & components::StatisticsStorage::GetMetricsStorageRef ( )
inline

Definition at line 45 of file statistics_storage.hpp.

◆ GetStorage() [1/2]

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

Definition at line 39 of file statistics_storage.hpp.

◆ GetStorage() [2/2]

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

Definition at line 41 of file statistics_storage.hpp.

◆ OnAllComponentsAreStopping()

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

◆ OnAllComponentsLoaded()

void components::StatisticsStorage::OnAllComponentsLoaded ( )
overridevirtual

Reimplemented from components::RawComponentBase.

◆ OnGracefulShutdown()

virtual void components::RawComponentBase::OnGracefulShutdown ( engine::Deadline )
virtualinherited

◆ OnLoadingCancelled()

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

Reimplemented in components::ComponentBase.

Definition at line 59 of file raw_component_base.hpp.


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