[#BloombergLP-balm-MetricRegistry-getId]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/balm.adoc[balm]::xref:BloombergLP/balm/MetricRegistry.adoc[MetricRegistry]::getId
:relfileprefix: ../../../
:mrdocs:

Return a metric id for `category` and `name`, registering if needed&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
xref:BloombergLP/balm/MetricId.adoc[MetricId]
getId(
    char const* category,
    char const* name);
----

== Description

Return a `balm&colon;&colon;MetricId` object for the metric identified by the specified `category` and `name`&period; If no corresponding metric has already been registered, register a new metric and return a `balm&colon;&colon;MetricId` object identifying that newly&hyphen;registered metric&period; The behavior is undefined unless `category` and `name` are null&hyphen;terminated&period; Note that this operation is guaranteed to return a valid `balm&colon;&colon;MetricId` object&period;

== Return Value

metric id for `category` and `name`

== Parameters

[cols="1,4"]
|===
| Name| Description
| *category*
| null&hyphen;terminated category name
| *name*
| null&hyphen;terminated metric name
|===


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