[#BloombergLP-bdlm-MetricsRegistry-setMetricsAdapter]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdlm.adoc[bdlm]::xref:BloombergLP/bdlm/MetricsRegistry.adoc[MetricsRegistry]::setMetricsAdapter
:relfileprefix: ../../../
:mrdocs:

Configure this metrics registry to register all metrics collection callbacks with the specified `adapter` when the registry has metrics collection enabled&period; This operation first, if there is already an associated metrics adapter, unregisters all the collection callbacks from that adapter, then registers the collection callbacks with the new `adapter` if metrics collection is enabled&period; Return 0 on success, and a non&hyphen;zero value otherwise&period;

== Synopsis

Declared in `&lt;bdlm&lowbar;metricsregistry&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
int
setMetricsAdapter(xref:BloombergLP/bdlm/MetricsAdapter.adoc[MetricsAdapter]* adapter);
----


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