[#BloombergLP-balm-CollectorRepository-getDefaultCollector-04] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/balm.adoc[balm]::xref:BloombergLP/balm/CollectorRepository.adoc[CollectorRepository]::getDefaultCollector :relfileprefix: ../../../ :mrdocs: Return the address of the modifiable default collector identified by the specified null‐terminated strings `category` and `metricName`. == Synopsis Declared in `<balm_collectorrepository.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- xref:BloombergLP/balm/Collector.adoc[Collector]* getDefaultCollector( char const* category, char const* metricName); ---- == Description 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. In addition, if the identified metric has not already been registered, add the identified metric to the `metricRegistry` supplied at construction. Note that this operation is logically equivalent to: ` getDefaultCollector(registry().getId(category, metricName)) ` == Return Value address of the default collector for the identified metric == Parameters [cols="1,4"] |=== | Name| Description | *category* | null‐terminated category name | *metricName* | null‐terminated metric name |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#