BloombergLP::balm::BdlmMetricsAdapter::registerCollectionCallback

Register the specified callback using the specified metricDescriptor.

Synopsis

Declared in <balm_bdlmmetricsadapter.h>

virtual
CallbackHandle
registerCollectionCallback(
    bdlm::MetricDescriptor const& metricDescriptor,
    Callback const& callback) override;

Description

Register the specified callback with the metrics manager specified at construction, using the specified metricDescriptor. If metricDescriptor.metricsNamspace() equals bdlm::MetricDescriptor::k_USE_METRICS_ADAPTER_NAMESPACE_SELECTION, use defaultMetricNamespace() for the namespace attribute during registration. If metricDescriptor.objectIdentifier() equals bdlm::MetricDescriptor::k_USE_METRICS_ADAPTER_OBJECT_ID_SELECTION, use the concatination of defaultObjectIdentifierPrefix(), a period, metricDescriptor.objectTypeAbbreviation(), a period, and metricDescriptor.instanceNumber() for the object identifier attribute during registration. The category name supplied to the MetricsManager provided at construction is the concatenation of the object type name attribute, a period, the metric name attribute, a period, and the object identifier attribute. Return the callback handle to be used with removeCollectionCallback.

Return Value

callback handle to be used with removeCollectionCallback

Parameters

NameDescription
metricDescriptordescriptor supplying metric attributes
callbackcollection callback to register