This topic has not yet been rated - Rate this topic

CrashDumps.EnableCollection Method

Enables collection of mini crash dumps or full crash dumps for a role instance.

Namespace: Microsoft.WindowsAzure.Diagnostics
Assembly: Microsoft.WindowsAzure.Diagnostics (in Microsoft.WindowsAzure.Diagnostics.dll)
'Usage
Dim enableFullDumps As Boolean

CrashDumps.EnableCollection(enableFullDumps)
public static void EnableCollection (
	bool enableFullDumps
)
public static void EnableCollection (
	boolean enableFullDumps
)
public static function EnableCollection (
	enableFullDumps : boolean
)

Parameters

enableFullDumps

Type: System.Boolean

If true, collects full crash dumps. If false, collects mini crash dumps.

When you enable collection of crash dumps, the resulting data is written to the CrashDumps directory in the DiagnosticStore local resource that is automatically configured for your role.

When crash dump data is transferred to persistent storage, it is stored to the wad-crash-dumps Blob container. You can specify the transfer interval of the CrashDumps directory by setting the ScheduledTransferPeriod property of Directories.

Example

The following code snippet creates a DiagnosticMonitorConfiguration object, enables full crash dump collection, and sets a transfer interval of 30 minutes.

public override bool OnStart()
{
    // Get the default initial configuration for DiagnosticMonitor.
    DiagnosticMonitorConfiguration diagnosticConfiguration = DiagnosticMonitor.GetDefaultInitialConfiguration();
         
    // Enable full crash dump collection.
    CrashDumps.EnableCollection(true);

    // Schedule a transfer period of 30 minutes. 
    diagnosticConfiguration.Directories.ScheduledTransferPeriod = TimeSpan.FromMinutes(30.0);

    // Start the DiagnosticMonitor using the diagnosticConfig and our connection string.
    DiagnosticMonitor.Start("Microsoft.WindowsAzure.Plugins.Diagnostics.ConnectionString", diagnosticConfiguration);

    return base.OnStart();
}


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
Diagnostic manager must have time to upload
If running, the default configuration of the diagnostic manager will upload these to "wad-crash-dumps".  They are normally stored in the local storage name "DiagnosticStore", which I guess has cleanOnRoleRecycle set to false.  Anyway, if your role is continuously crashing then it may never finish doing this before it is terminated and the role is recycled.