Share via


DeploymentDiagnosticManager Class

 

Provides a class for managing the configuration of diagnostic monitors remotely.

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

Inheritance Hierarchy

System.Object
  Microsoft.WindowsAzure.Diagnostics.Management.DeploymentDiagnosticManager

Syntax

public class DeploymentDiagnosticManager
public ref class DeploymentDiagnosticManager 
type DeploymentDiagnosticManager = class end
Public Class DeploymentDiagnosticManager

Constructors

Name Description
System_CAPS_pubmethod DeploymentDiagnosticManager(String, String)

Creates a new instance of the DeploymentDiagnosticManager class.

Properties

Name Description
System_CAPS_pubpropertySystem_CAPS_static AllowInsecureRemoteConnections

This API is obsolete. Specifies that the deployment diagnostic manager may use non-secure (HTTP) connections to communicate with the storage account.

Methods

Name Description
System_CAPS_pubmethod Equals(Object)

(Inherited from Object.)

System_CAPS_protmethod Finalize()

(Inherited from Object.)

System_CAPS_pubmethod GetHashCode()

(Inherited from Object.)

System_CAPS_pubmethod GetRoleInstanceDiagnosticManager(String, String)

Returns a RoleInstanceDiagnosticManager for the specified role instance.

System_CAPS_pubmethod GetRoleInstanceDiagnosticManagersForRole(String)

Returns the list of role instance diagnostic managers for the specified role.

System_CAPS_pubmethod GetRoleInstanceIdsForRole(String)

Returns a list of IDs of active role instances that have a diagnostic monitor running.

System_CAPS_pubmethod GetRoleNames()

Lists the set of roles which have successfully started at least one diagnostic monitor.

System_CAPS_pubmethod GetType()

(Inherited from Object.)

System_CAPS_protmethod MemberwiseClone()

(Inherited from Object.)

System_CAPS_pubmethod ToString()

(Inherited from Object.)

Remarks

The DeploymentDiagnosticManager class is used to get the diagnostics configuration of a deployment and its role instances that are currently running on Windows Azure. Once a deployment has been specified, you can use other classes and methods of the Microsoft.WindowsAzure.Diagnostics.Management namespace to modify the diagnostics and logging configuration for the deployment and its roles.

You can instantiate a DeploymentDiagnosticManager class from an application running in the cloud or on a local computer. The only requirement is that your application can access the Blob storage endpoint for the wad-control-container created by your role’s DiagnosticMonitor.

You create a DeploymentDiagnosticManager object for a deployment by specifying the storage location for your diagnostics configuration file, using the DiagnosticsConnectionString, and supplying the deployment ID of a hosted service.

For example, the following code snippet creates a new deployment diagnostic manager.

// Get the connection string. It's recommended that you store the connection string in your web.config or app.config file.
// Use the ConfigurationManager type to retrieve your storage connection string.  You can find the account name and key in
// the Windows Azure Management Portal (https://manage.windowsazure.com).
//string connectionString = "DefaultEndpointsProtocol=https;AccountName=<AccountName>;AccountKey=<AccountKey>";
string connectionString = System.Configuration.ConfigurationManager.ConnectionStrings["StorageConnectionString"].ConnectionString;

// You can find the deployment ID, role name, and role instance ID in the 
// Windows Azure Management Portal (https://manage.windowsazure.com).
string deploymentId = "28267ed8caf3424eab3f0b01acdd7281";

// Create a DeploymentDiagnosticManager for the deployment.
DeploymentDiagnosticManager deploymentDiagnosticManager = new DeploymentDiagnosticManager(connectionString, deploymentId);

Warning

This API is not supported in Azure SDK versions 2.5 and higher. Instead, use the diagnostics.wadcfg XML configuration file. For more information, see Collect Logging Data by Using Azure Diagnostics.

Thread Safety

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

See Also

Microsoft.WindowsAzure.Diagnostics.Management Namespace

Return to top