Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

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 Enumeration DataBufferName

Member nameDescription
DiagnosticInfrastructureLogsIndicates the data buffer for logs generated by the underlying diagnostics infrastructure itself.
DirectoriesInidicates the data buffer for file-based logs.
LogsIndicates the data buffer for Windows Azure logs.
PerformanceCountersIndicates the data buffer for performance counters.
WindowsEventLogsIndicates 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(DataBufferName) 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 (http://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 (http://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.

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