[#BloombergLP-balm-MetricsManager-registerCollectionCallback-0a]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/balm.adoc[balm]::xref:BloombergLP/balm/MetricsManager.adoc[MetricsManager]::registerCollectionCallback
:relfileprefix: ../../../
:mrdocs:

`registerCollectionCallback` overloads

== Synopses

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

Register a callback to collect records for the specified `category`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
xref:BloombergLP/balm/MetricsManager/CallbackHandle.adoc[CallbackHandle]
xref:BloombergLP/balm/MetricsManager/registerCollectionCallback-08.adoc[registerCollectionCallback](
    xref:BloombergLP/balm/Category.adoc[Category] const* category,
    xref:BloombergLP/balm/MetricsManager/RecordsCollectionCallback.adoc[RecordsCollectionCallback] const& callback);
----

[.small]#xref:BloombergLP/balm/MetricsManager/registerCollectionCallback-08.adoc[_» more&period;&period;&period;_]#

Register a callback to collect records for the named category&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
xref:BloombergLP/balm/MetricsManager/CallbackHandle.adoc[MetricsManager::CallbackHandle]
xref:BloombergLP/balm/MetricsManager/registerCollectionCallback-05.adoc[registerCollectionCallback](
    char const* categoryName,
    xref:BloombergLP/balm/MetricsManager/RecordsCollectionCallback.adoc[RecordsCollectionCallback] const& callback);
----

[.small]#xref:BloombergLP/balm/MetricsManager/registerCollectionCallback-05.adoc[_» more&period;&period;&period;_]#

== Return Value

opaque integer handle that can be used later to remove the callback

== Parameters

[cols="1,4"]
|===
| Name| Description
| *category*
| category for which to register the callback
| *callback*
| callback invoked to collect records for `category`
| *categoryName*
| null&hyphen;terminated category name
|===


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