[#BloombergLP-balm-ConfigurationUtil-setPreferredPublicationType] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/balm.adoc[balm]::xref:BloombergLP/balm/ConfigurationUtil.adoc[ConfigurationUtil]::setPreferredPublicationType :relfileprefix: ../../../ :mrdocs: Set the preferred publication type of the metric identified by the specified `category` and `metricName` to the specified `publicationType`. Optionally specify a metrics `manager` to configure. If `manager` is 0, configure the default metrics manager; if `manager` is 0 and the default metrics manager has not been initialized, this method has no effect. Return 0 on success, or a non‐zero value if `manager` is 0 and the default metrics manager has not been initialized. The preferred publication type of a metric indicates the preferred aggregate to publish for that metric, or `PublicationType::e_UNSPECIFIED` if there is no preference. For example, specifying `e_AVG` indicates that the average value of the collected metric should be reported. If a `MetricId` does not exist for `category` and `metricName`, create one and add it to the metric registry of the indicated metrics manager. Note that there is no uniform definition for how publishers will interpret this value. == Synopsis Declared in `<balm_configurationutil.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- static int setPreferredPublicationType( char const* category, char const* metricName, xref:BloombergLP/balm/PublicationType/Value.adoc[PublicationType::Value] publicationType, xref:BloombergLP/balm/MetricsManager.adoc[MetricsManager]* manager = 0); ---- [.small]#Created with https://www.mrdocs.com[MrDocs]#