DataBufferName Enumeration

 

Enumeration of each data buffer type.

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

Syntax

public enum DataBufferName
public enum class DataBufferName
type DataBufferName
Public Enumeration DataBufferName

Members

Member name Description
DiagnosticInfrastructureLogs

Indicates the data buffer for logs generated by the underlying diagnostics infrastructure itself.

Directories

Inidicates the data buffer for file-based logs.

Logs

Indicates the data buffer for Windows Azure logs.

PerformanceCounters

Indicates the data buffer for performance counters.

WindowsEventLogs

Indicates the data buffer for Windows event logs.

Remarks

The DataBufferName enumeration is used to specify a data buffer when starting or stopping an on-demand transfer of logging data. Specifically, this enumeration is used for the BeginOnDemandTransfer and CancelOnDemandTransfers methods. For example, the following code snippet starts a transfer of performance counter logs for the specified role instance:

// 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;

// The deployment ID, role name, and role instance ID for your application 
// can be obtained from the Windows Azure Management Portal (https://manage.windowsazure.com).  
// See your application dashboard under Cloud Services.
string deploymentID = "e2ab8b6667644666ba627bdf6f5e4daa";
string roleName = "WebRole1";
string roleInstanceId = "WebRole1_IN_0";

// Get the DeploymentDiagnosticManager object for your deployment.
DeploymentDiagnosticManager deploymentDiagnosticManager = new DeploymentDiagnosticManager(connectionString, deploymentID);

// Get the diagnostic manager for the specified role instance.
RoleInstanceDiagnosticManager roleInstanceDiagnosticManager = deploymentDiagnosticManager.GetRoleInstanceDiagnosticManager(roleName, roleInstanceId);

// Begin the on-demand transfer of performance counter logs.
roleInstanceDiagnosticManager.BeginOnDemandTransfer(DataBufferName.PerformanceCounters);

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.

See Also

Microsoft.WindowsAzure.Diagnostics Namespace

Return to top