This class implements a manager for the recording and publishing of metrics.

Synopsis

Declared in <balm_metricsmanager.h>

class MetricsManager;

Description

Metrics managed by a MetricsManager are grouped into categories identified by a string. The metrics manager allows clients to register a Publisher object using the addGeneralPublisher and addSpecificPublisher operations. Metrics can be recorded in one of two ways: Clients can (1) implement their own metric collection facilities and register a callback using this metric manager's registerMetricsCallback method; or (2) use the Collector objects available from the CollectorRepository owned by this metrics manager.

Type Aliases

Name

Description

CallbackHandle

Identifies a registered RecordsCollectionCallback.

RecordsCollectionCallback

Alias for a callback that collects metric records and optionally resets them.

Enums

Name

Description

Unnamed enum

Callback handle constants.

Member Functions

Name

Description

MetricsManager [constructor]

Create a MetricsManager.

~MetricsManager [destructor]

Destroy this MetricsManager.

addGeneralPublisher

Add a publisher used for every category published by this manager.

addSpecificPublisher

addSpecificPublisher overloads

collectSample

collectSample overloads

collectorRepository

collectorRepository overloads

findGeneralPublishers

findGeneralPublishers overloads

findSpecificPublishers

findSpecificPublishers overloads

metricRegistry

metricRegistry overloads

publish

publish overloads

publishAll

publishAll overloads

registerCollectionCallback

registerCollectionCallback overloads

removeCollectionCallback

Remove the callback associated with the specified handle.

removePublisher

removePublisher overloads

setAllCategoriesEnabled

Set whether all registered categories are enabled to the specified value.

setCategoryEnabled

setCategoryEnabled overloads

operator BloombergLP::bslmf::NestedTraitDeclaration<MetricsManager, UsesBslmaAllocator>

Declare that this type uses a bslma allocator.

Friends

Name

Description

BloombergLP::balm::MetricsManager_PublicationHelper

defined in implementation

Created with MrDocs