[#BloombergLP-balm-MetricsManager-RecordsCollectionCallback]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/balm.adoc[balm]::xref:BloombergLP/balm/MetricsManager.adoc[MetricsManager]::RecordsCollectionCallback
:relfileprefix: ../../../
:mrdocs:

Alias for a callback that collects metric records and optionally resets them&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
typedef xref:bsl/function-0a.adoc[bsl::function&lt;void(xref:bsl/vector-00d.adoc[bsl::vector&lt;MetricRecord&gt;]*, bool)&gt;] RecordsCollectionCallback;
----

== Description

`RecordsCollectionCallback` is an alias for a callback function that appends to the supplied `MetricRecord` vector the values of the collected metrics, and, if the provided `bool` is `true`, resets those metrics to their default values&period; Clients can register callbacks matching this prototype with the metrics manager&period; Here is an example prototype matching this callback&colon; &grave; void collectionCb(bsl&colon;&colon;vector&lt;MetricRecord&gt; &ast;records, bool resetFlag)&semi; &grave;


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