[#BloombergLP-balm-ConfigurationUtil-setUserData-09]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/balm.adoc[balm]::xref:BloombergLP/balm/ConfigurationUtil.adoc[ConfigurationUtil]::setUserData
:relfileprefix: ../../../
:mrdocs:

Associate the specified `value` with the specified data `key` in the description of the metric having the specified `category` and `metricName`&period; Optionally specify a metrics `manager` to configure&period; If `manager` is 0, configure the default metrics manager&semi; if `manager` is 0 and the default metrics manager has not been initialized, this method has no effect&period; If a `MetricId` does not exist for the `category` and `metricName`, create one and add it to the metric registry of the indicated metrics manager&period; The behavior is undefined unless `key` was previously created for the indicated metrics manager&apos;s metrics registry (e&period;g&period;, by calling `createUserDataKey`)&period; Note that this method allows clients of `balm` to associate (opaque) application&hyphen;specific information with a metric&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
static
void
setUserData(
    char const* category,
    char const* metricName,
    xref:BloombergLP/balm/MetricDescription/UserDataKey.adoc[MetricDescription::UserDataKey] key,
    void const* value,
    xref:BloombergLP/balm/MetricsManager.adoc[MetricsManager]* manager = 0);
----


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