[#BloombergLP-balm-BdlmMetricsAdapter-registerCollectionCallback-00] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/balm.adoc[balm]::xref:BloombergLP/balm/BdlmMetricsAdapter.adoc[BdlmMetricsAdapter]::registerCollectionCallback :relfileprefix: ../../../ :mrdocs: 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`. == Synopsis Declared in `<balm_bdlmmetricsadapter.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- virtual xref:BloombergLP/bdlm/MetricsAdapter/CallbackHandle.adoc[CallbackHandle] registerCollectionCallback( xref:BloombergLP/bdlm/MetricDescriptor.adoc[bdlm::MetricDescriptor] const& metricDescriptor, xref:BloombergLP/bdlm/MetricsAdapter/Callback.adoc[Callback] const& callback) override; ---- [.small]#Created with https://www.mrdocs.com[MrDocs]#