[#BloombergLP-balm-MetricRegistry-addId] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/balm.adoc[balm]::xref:BloombergLP/balm/MetricRegistry.adoc[MetricRegistry]::addId :relfileprefix: ../../../ :mrdocs: Add a metric id for `category` and `name` if not already registered. == Synopsis Declared in `<balm_metricregistry.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- xref:BloombergLP/balm/MetricId.adoc[MetricId] addId( char const* category, char const* name); ---- == Description Add the specified `category` and `name` to this registry, unless it has already been registered, and return a `balm::MetricId` object identifying the newly‐registered metric. If the indicated metric has already been registered, the returned `balm::MetricId` object will _not_ be valid (i.e., `isValid` will return `false`). The behavior is undefined unless `category` and `name` are null‐terminated. == Return Value newly‐registered metric id, or an invalid id if already registered == Parameters [cols="1,4"] |=== | Name| Description | *category* | null‐terminated category name | *name* | null‐terminated metric name |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#