[#BloombergLP-balm-CollectorRepository-addIntegerCollector-06c]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/balm.adoc[balm]::xref:BloombergLP/balm/CollectorRepository.adoc[CollectorRepository]::addIntegerCollector
:relfileprefix: ../../../
:mrdocs:

Return a shared pointer to a newly&hyphen;created modifiable collector identified by the specified `metricId` and add that collector to the repository&period; The behavior is undefined unless `metricId` is a valid id returned by the `MetricRepository` supplied at construction&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
xref:bsl/shared_ptr-0a.adoc[bsl::shared&lowbar;ptr&lt;IntegerCollector&gt;]
addIntegerCollector(xref:BloombergLP/balm/MetricId.adoc[MetricId] const& metricId);
----


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