Export (0) Print
Expand All

DiagnosticMonitor.Start Method (String)

Updated: December 6, 2013

Starts a diagnostic monitor using the specified storage account and default diagnostic monitor configuration.

Namespace: Microsoft.WindowsAzure.Diagnostics
Assembly: Microsoft.WindowsAzure.Diagnostics (in Microsoft.WindowsAzure.Diagnostics.dll)

Public Shared Function Start ( _
	diagnosticsStorageAccountConfigurationSettingName As String _
) As DiagnosticMonitor



Type: System.String

A String that specifies a connection string to a storage account.

Return Value

Type: Microsoft.WindowsAzure.Diagnostics.DiagnosticMonitor

Returns DiagnosticMonitor.

This method starts a DiagnosticMonitor using the specified storage account and the default DiagnosticMonitorConfiguration. For more information about the default configuration, see GetDefaultInitialConfiguration.

Data buffers are transferred to the storage account indicated by the specified configuration setting. The storage account can be the local storage emulator, or a Windows Azure storage account in the cloud.

This method also registers the diagnostics monitoring agent for notification when changes to configuration settings occur. If the value of the connection string is changed in the ServiceConfiguration.cscfg file, the diagnostics monitoring agent will be automatically reconfigured to use the new connection.

If your storage account is misconfigured, your role instance will start without diagnostics. To ensure that diagnostics will start, verify that your storage account is configured correctly before calling the Start(String) method.


The following code snippet starts the DiagnosticMonitor using the connection string specified in the ServiceConfiguration.cscfg file:


public class WebRole : RoleEntryPoint
    public override bool OnStart()
        // Start the DiagnosticMonitor with the default DiagnosticMonitorConfiguration.

        return base.OnStart();


   <Setting name="Microsoft.WindowsAzure.Plugins.Diagnostics.ConnectionString"

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, Windows Server 2008, Windows 8.1, Windows Server 2012 R2, Windows 8 and Windows Server 2012

Target Platforms

Community Additions

© 2015 Microsoft