DataBufferName Enumeration


Updated: April 22, 2013

Enumeration of each data buffer type.

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

public enum DataBufferName

Member nameDescription

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


Inidicates the data buffer for file-based logs.


Indicates the data buffer for Windows Azure logs.


Indicates the data buffer for performance counters.


Indicates the data buffer for Windows event logs.

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 (
//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 (  
// 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.

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.

Return to top