BloombergLP::bdlm::MetricsRegistry

This class implements a transferable registry of metrics.

Synopsis

Declared in <bdlm_metricsregistry.h>

class MetricsRegistry;

Description

This class implements a mechanism that provides a registry of metrics that is transferable to implementations of the bdlm::MetricsAdapter protocol. This class is usually a singleton.

Type Aliases

NameDescription
Callback This typedef is an alias for a metrics registration callback.
CallbackHandle This typedef is an alias for a metrics registration callback handle.

Member Functions

NameDescription
MetricsRegistry [constructor]Create a registry that can forward metric registrations to an adapter.
~MetricsRegistry [destructor]Unregister all registered metrics and destroy this MetricsRegistry object.
allocator Return the allocator used by this object to supply memory.
disableMetricsCollection Disable metrics collection.
enableMetricsCollection Enable metrics collection.
numRegisteredCollectionCallbacks Return the number of registered metrics collection callbacks.
registerCollectionCallback Register a metric collection callback and load a handle into result.
removeMetricsAdapter Remove adapter if it is the adapter associated with this registry.
setMetricsAdapter Configure this registry to use the specified adapter.
operator BloombergLP::bslmf::NestedTraitDeclaration<MetricsRegistry, UsesBslmaAllocator> Declare that this type uses a bslma allocator.

Static Member Functions

NameDescription
defaultInstance Return a non-const reference to the metrics registry singleton.