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

`getDefaultCollector` overloads

== Synopses

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

Return the address of the modifiable default collector identified by the specified `metricId`&period; If a default collector for the identified metric does not already exist in the repository, create one, add it to the repository, and return its address&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
xref:BloombergLP/balm/Collector.adoc[Collector]*
xref:BloombergLP/balm/CollectorRepository/getDefaultCollector-02.adoc[getDefaultCollector](xref:BloombergLP/balm/MetricId.adoc[MetricId] const& metricId);
----

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

Return the address of the modifiable default collector identified by the specified null&hyphen;terminated strings `category` and `metricName`&period; If a collector for the identified metric does not already exist in the repository, create one, add it to the repository, and return its address&period; In addition, if the identified metric has not already been registered, add the identified metric to the `metricRegistry` supplied at construction&period; Note that this operation is logically equivalent to&colon; &grave; getDefaultCollector(registry()&period;getId(category, metricName)) &grave;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
xref:BloombergLP/balm/Collector.adoc[Collector]*
xref:BloombergLP/balm/CollectorRepository/getDefaultCollector-04.adoc[getDefaultCollector](
    char const* category,
    char const* metricName);
----

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


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