[#BloombergLP-balm-DefaultMetricsManagerScopedGuard-2constructor-00]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/balm.adoc[balm]::xref:BloombergLP/balm/DefaultMetricsManagerScopedGuard.adoc[DefaultMetricsManagerScopedGuard]::DefaultMetricsManagerScopedGuard
:relfileprefix: ../../../
:mrdocs:

Create a scoped guard which invokes `DefaultMetricsManager&colon;&colon;create()` to create a default metrics manager instance that is configured with a stream publisher that will publish collected metrics to the specified `stream`&period; Optionally specify a `basicAllocator` used to supply memory&period; If `basicAllocator` is 0, the currently installed global allocator is used&period; The behavior is undefined unless `DefaultMetricsManager&colon;&colon;instance()` is 0 prior to creating the guard&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
DefaultMetricsManagerScopedGuard(
    std::ostream& stream,
    xref:BloombergLP/bslma/Allocator.adoc[bslma::Allocator]* basicAllocator = 0);
----


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