[#BloombergLP-balm-DefaultMetricsManagerScopedGuard-2constructor-01]
= 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`&period;

== Synopsis

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

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

== Description

Optionally specify a `basicAllocator` used to obtain memory&period; If `basicAllocator` is 0, the currently installed global allocator is used&period; The behavior is undefined unless `0 &equals;&equals; DefaultMetricsManager&colon;&colon;instance()` prior to creating the guard&period; Note that the default metrics manager instance is not configured with a publisher&semi; clients must create a `Publisher` object and add it to the default metrics manager in order to publish metrics&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *basicAllocator*
| memory allocator&semi; null uses the default
|===


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