[#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`&period; If `metricDescriptor&period;metricsNamspace()` equals `bdlm&colon;&colon;MetricDescriptor&colon;&colon;k&lowbar;USE&lowbar;METRICS&lowbar;ADAPTER&lowbar;NAMESPACE&lowbar;SELECTION`, use `defaultMetricNamespace()` for the namespace attribute during registration&period; If `metricDescriptor&period;objectIdentifier()` equals `bdlm&colon;&colon;MetricDescriptor&colon;&colon;k&lowbar;USE&lowbar;METRICS&lowbar;ADAPTER&lowbar;OBJECT&lowbar;ID&lowbar;SELECTION`, use the concatination of `defaultObjectIdentifierPrefix()`, a period, `metricDescriptor&period;objectTypeAbbreviation()`, a period, and `metricDescriptor&period;instanceNumber()` for the object identifier attribute during registration&period; 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&period; Return the callback handle to be used with `removeCollectionCallback`&period;

== Synopsis

Declared in `&lt;balm&lowbar;bdlmmetricsadapter&period;h&gt;`

[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]#
