[#BloombergLP-bdlm-MetricsRegistry-enableMetricsCollection] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdlm.adoc[bdlm]::xref:BloombergLP/bdlm/MetricsRegistry.adoc[MetricsRegistry]::enableMetricsCollection :relfileprefix: ../../../ :mrdocs: Enable metrics collection. If there is an associated metrics adapter, all collection callbacks will be registered with the adapter. Return 0 on success, and non‐zero value otherwise. Metrics collection is enabled at construction of this registry. == Synopsis Declared in `<bdlm_metricsregistry.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- int enableMetricsCollection(); ---- [.small]#Created with https://www.mrdocs.com[MrDocs]#