[#BloombergLP-balm-DefaultMetricsManagerScopedGuard-2constructor-09] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/balm.adoc[balm]::xref:BloombergLP/balm/DefaultMetricsManagerScopedGuard.adoc[DefaultMetricsManagerScopedGuard]::DefaultMetricsManagerScopedGuard :relfileprefix: ../../../ :mrdocs: Constructors == Synopses Declared in `<balm_defaultmetricsmanager.h>` Create a scoped guard which invokes the `DefaultMetricsManager::create` method. Optionally specify a `basicAllocator` used to obtain memory. If `basicAllocator` is 0, the currently installed global allocator is used. The behavior is undefined unless `0 == DefaultMetricsManager::instance()` prior to creating the guard. Note that the default metrics manager instance is not configured with a publisher; clients must create a `Publisher` object and add it to the default metrics manager in order to publish metrics. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- xref:BloombergLP/balm/DefaultMetricsManagerScopedGuard/2constructor-01.adoc[DefaultMetricsManagerScopedGuard](xref:BloombergLP/bslma/Allocator.adoc[bslma::Allocator]* basicAllocator = 0); ---- [.small]#xref:BloombergLP/balm/DefaultMetricsManagerScopedGuard/2constructor-01.adoc[_» more..._]# Create a scoped guard which invokes `DefaultMetricsManager::create()` to create a default metrics manager instance that is configured with a stream publisher that will publish collected metrics to the specified `stream`. Optionally specify a `basicAllocator` used to supply memory. If `basicAllocator` is 0, the currently installed global allocator is used. The behavior is undefined unless `DefaultMetricsManager::instance()` is 0 prior to creating the guard. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- xref:BloombergLP/balm/DefaultMetricsManagerScopedGuard/2constructor-00.adoc[DefaultMetricsManagerScopedGuard]( std::ostream& stream, xref:BloombergLP/bslma/Allocator.adoc[bslma::Allocator]* basicAllocator = 0); ---- [.small]#xref:BloombergLP/balm/DefaultMetricsManagerScopedGuard/2constructor-00.adoc[_» more..._]# [.small]#Created with https://www.mrdocs.com[MrDocs]#