[#BloombergLP-balm-CollectorRepository-addCollector-09]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/balm.adoc[balm]::xref:BloombergLP/balm/CollectorRepository.adoc[CollectorRepository]::addCollector
:relfileprefix: ../../../
:mrdocs:

`addCollector` overloads

== Synopses

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

Return a shared pointer to a new collector for the specified `metricId` and add it to the repository&period;


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

[.small]#xref:BloombergLP/balm/CollectorRepository/addCollector-02.adoc[_» more&period;&period;&period;_]#

Return a shared pointer to a new collector for the specified `category` and `metricName`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
xref:bsl/shared_ptr-0a.adoc[bsl::shared&lowbar;ptr&lt;Collector&gt;]
xref:BloombergLP/balm/CollectorRepository/addCollector-0e.adoc[addCollector](
    char const* category,
    char const* metricName);
----

[.small]#xref:BloombergLP/balm/CollectorRepository/addCollector-0e.adoc[_» more&period;&period;&period;_]#

== Return Value

shared pointer to the newly created collector

== Parameters

[cols="1,4"]
|===
| Name| Description
| *metricId*
| identity of the metric for the new collector
| *category*
| null&hyphen;terminated category name
| *metricName*
| null&hyphen;terminated metric name
|===


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