[#BloombergLP-bdlm-MetricsAdapter-registerCollectionCallback]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdlm.adoc[bdlm]::xref:BloombergLP/bdlm/MetricsAdapter.adoc[MetricsAdapter]::registerCollectionCallback
:relfileprefix: ../../../
:mrdocs:

Register a collection callback with a monitoring system&period;

== Synopsis

Declared in `&lt;bdlm&lowbar;metricsadapter&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
virtual
xref:BloombergLP/bdlm/MetricsAdapter/CallbackHandle.adoc[CallbackHandle]
registerCollectionCallback(
    xref:BloombergLP/bdlm/MetricDescriptor.adoc[MetricDescriptor] const& metricDescriptor,
    xref:BloombergLP/bdlm/MetricsAdapter/Callback.adoc[Callback] const& callback) = 0;
----

== Description

Register the specified `callback` with a monitoring system, using the specified `metricDescriptor` for the registration&period; Return the callback handle to be used with `removeCollectionCallback`&period; Note the information used for registration is implementation dependant, and may involve values computed from the supplied arguments&period;

== Return Value

callback handle to be used with `removeCollectionCallback`

== Parameters

[cols="1,4"]
|===
| Name| Description
| *metricDescriptor*
| descriptor used for the registration
| *callback*
| collection callback to register
|===


[.small]#Created with https://www.mrdocs.com[MrDocs]#
