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

`collectSample` overloads

== Synopses

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

Collect a metric sample from the indicated categories into `sample`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
void
xref:BloombergLP/balm/MetricsManager/collectSample-01.adoc[collectSample](
    xref:BloombergLP/balm/MetricSample.adoc[MetricSample]* sample,
    xref:bsl/vector-00d.adoc[bsl::vector&lt;MetricRecord&gt;]* records,
    bool resetFlag = false);
----

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

Same as the preceding overload, collecting from the specified `categories` sequence&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
void
xref:BloombergLP/balm/MetricsManager/collectSample-06.adoc[collectSample](
    xref:BloombergLP/balm/MetricSample.adoc[MetricSample]* sample,
    xref:bsl/vector-00d.adoc[bsl::vector&lt;MetricRecord&gt;]* records,
    xref:BloombergLP/balm/Category.adoc[Category] const const* categories[],
    int numCategories,
    bool resetFlag = false);
----

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

== Parameters

[cols="1,4"]
|===
| Name| Description
| *sample*
| receives the collected metric sample
| *records*
| receives the metric records referred to by `sample`
| *resetFlag*
| if `true`, reset collected metrics to defaults
| *categories*
| sequence of unique categories to sample
| *numCategories*
| number of categories in `categories`
|===


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