[#BloombergLP-balm-Metric-2constructor-0b3]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/balm.adoc[balm]::xref:BloombergLP/balm/Metric.adoc[Metric]::Metric
:relfileprefix: ../../../
:mrdocs:

Create a metric object to collect values for the metric implied by the specified `collector`&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
explicit
Metric(xref:BloombergLP/balm/Collector.adoc[Collector]* collector);
----

== Description

The collector identifies the metric via `collector&hyphen;&gt;metricId()`&period; The behavior is undefined unless `collector` is a valid address of a `Collector` object and `collector` has a valid id (i&period;e&period;, `collector&hyphen;&gt;metricId()&period;isValid()`)&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *collector*
| collector identifying the metric to record
|===


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