[#BloombergLP-balm-MetricDescription-userData]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/balm.adoc[balm]::xref:BloombergLP/balm/MetricDescription.adoc[MetricDescription]::userData
:relfileprefix: ../../../
:mrdocs:

Return the non&hyphen;modifiable value associated with the specified user&hyphen;data `key`&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
void const*
userData(xref:BloombergLP/balm/MetricDescription/UserDataKey.adoc[UserDataKey] key) const;
----

== Description

If the data for `key` has not been set, a value of 0 is returned, which is indistinguishable from a valid `key` with a 0 value&period; The behavior is undefined unless `key &gt;&equals; 0`&period; Note that this method allows clients of `balm` to access the (opaque) application&hyphen;specific information that they have previously associated with a metric (via `setUserData`)&period;

== Return Value

opaque user&hyphen;data value for `key`, or 0 if unset

== Parameters

[cols="1,4"]
|===
| Name| Description
| *key*
| user&hyphen;data key associated with this metric
|===


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