This topic has not yet been rated - Rate this topic

DiagnosticMonitorConfiguration.OverallQuotaInMB Property

Gets or sets the total amount of local storage allocated for all logging buffers.

Namespace: Microsoft.WindowsAzure.Diagnostics
Assembly: Microsoft.WindowsAzure.Diagnostics (in Microsoft.WindowsAzure.Diagnostics.dll)
'Usage
Dim instance As DiagnosticMonitorConfiguration
Dim value As Integer

value = instance.OverallQuotaInMB

instance.OverallQuotaInMB = value
public int OverallQuotaInMB { get; set; }
/** @property */
/** @attribute CompilerGeneratedAttribute() */ 
public int get_OverallQuotaInMB ()

/** @property */
/** @attribute CompilerGeneratedAttribute() */ 
public void set_OverallQuotaInMB (int value)

CompilerGeneratedAttribute 
public function get OverallQuotaInMB () : int

CompilerGeneratedAttribute 
public function set OverallQuotaInMB (value : int)

Property Value

Type: System.Int32

Returns Int32.

The OverallQuotaInMB property specifies the amount of local storage allocated for the combined total of all the data buffers’ BufferQuotaInMB properties.

By default, the OverallQuotaInMB is set to 4GB. If you want to specify a smaller amount, you can set this property to your desired value. You cannot specify a larger value using this property; instead you must add a <LocalStorage> element for DiagnosticStore to your ServiceDefinition.csdef file and change the sizeInMB attribute accordingly. For example:

ServiceDefinition.csdef

<LocalResources>
    <LocalStorage name="DiagnosticStore" sizeInMB="8192" cleanOnRoleRecycle="false"/>
</LocalResources>

Note that if you specify a larger size in your ServiceConfiguration.cscfg file, such as 8GB in the example above, you must also set the OverallQuotaInMB property to the same value or a smaller value. If you make no changes to the value of the OverallQuotaInMB property, your data buffers will be limited to the original 4GB value.

For more information see How to Configure Local Storage Resources and Code Quick Start: Capturing diagnostics in your Windows Azure application.

Example 1

The following snippet creates a new diagnostic monitor configuration and specifies a smaller overall quota.

// Get the default initial configuration for DiagnosticMonitor.
DiagnosticMonitorConfiguration diagnosticConfiguration = DiagnosticMonitor.GetDefaultInitialConfiguration();

// Set an overall quota of 2GB.
diagnosticConfiguration.OverallQuotaInMB = 2048;

Example 2

The following snippet from a ServiceConfiguration.cscfg file sets the DiagnosticStore maximum size to 8GB.

<LocalResources>
    <LocalStorage name="DiagnosticStore" sizeInMB="8192" cleanOnRoleRecycle="false"/>
</LocalResources>

The following snippet creates a new diagnostic monitor configuration and specifies the same size as the ServiceConfiguration.cscfg file above.

// Get the default initial configuration for DiagnosticMonitor.
DiagnosticMonitorConfiguration diagnosticConfiguration = DiagnosticMonitor.GetDefaultInitialConfiguration();

// Set an overall quota of 8GB.
diagnosticConfiguration.OverallQuotaInMB = 8192;


Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Development Platforms

Windows Vista, Windows 7 and Windows Server 2008

Target Platforms

Did you find this helpful?
(1500 characters remaining)
Community Content Add
Annotations FAQ