[#BloombergLP-balm-MetricRegistry-setUserData-0b]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/balm.adoc[balm]::xref:BloombergLP/balm/MetricRegistry.adoc[MetricRegistry]::setUserData
:relfileprefix: ../../../
:mrdocs:

`setUserData` overloads

== Synopses

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

Associate `value` with `key` on `metricId`&apos;s description&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
void
xref:BloombergLP/balm/MetricRegistry/setUserData-0c.adoc[setUserData](
    xref:BloombergLP/balm/MetricId.adoc[MetricId] const& metricId,
    xref:BloombergLP/balm/MetricDescription/UserDataKey.adoc[MetricDescription::UserDataKey] key,
    void const* value);
----

[.small]#xref:BloombergLP/balm/MetricRegistry/setUserData-0c.adoc[_» more&period;&period;&period;_]#

Associate `value` with `key` on metrics matching `categoryName`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
void
xref:BloombergLP/balm/MetricRegistry/setUserData-00.adoc[setUserData](
    char const* categoryName,
    xref:BloombergLP/balm/MetricDescription/UserDataKey.adoc[MetricDescription::UserDataKey] key,
    void const* value,
    bool prefixFlag = false);
----

[.small]#xref:BloombergLP/balm/MetricRegistry/setUserData-00.adoc[_» more&period;&period;&period;_]#

== Parameters

[cols="1,4"]
|===
| Name| Description
| *metricId*
| metric whose user data is set
| *key*
| user&hyphen;data key previously obtained from `createUserDataKey`
| *value*
| opaque user&hyphen;data value to associate
| *categoryName*
| category name, or prefix when `prefixFlag` is true
| *prefixFlag*
| if true, match categories by name prefix
|===


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