EN
Deze inhoud is niet beschikbaar in uw taal, maar wel in het Engels.

RoleInstanceDiagnosticManager.BeginOnDemandTransfer Method (DataBufferName)

 

Begins an on-demand transfer of the specified data buffer.

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

public Guid BeginOnDemandTransfer(
	DataBufferName sourceBufferName
)

Parameters

sourceBufferName
Type: Microsoft.WindowsAzure.Diagnostics.DataBufferName

Type: Microsoft.WindowsAzure.Diagnostics.DataBufferName

The name of the source buffer.

Return Value

Type: System.Guid

Type: System.Guid

A request ID identifying the transfer.

The BeginOnDemandTransfer method is used to start an on-demand transfer of buffered diagnostic data from the local storage of a role instance to your desired final destination. The input parameter, sourceBufferName, indicates the value of the DataBufferName enumeration that you want to transfer.

Only one transfer of each data buffer can occur at a time. For example, if you call this method using PerformanceCounters to start transferring all performance counter data for a role instance, you cannot call it again until the transfer has completed.

Example

The following code snippet starts an on-demand transfer of performance counter data for the role instance:

// Get the diagnostic monitor for the specified role instance.
RoleInstanceDiagnosticManager roleInstanceDiagnosticManager = 
       new RoleInstanceDiagnosticManager(myStorageAccount, 
                                         "28281fc7754b44faa9ccf4911983edf1",
                                         "MyWebRole",
                                         "deployment(1).MyAzureProject.WebRole1.0");

// Start a transfer of performance counter logs.
roleInstanceDiagnosticManager.BeginOnDemandTransfer(DataBufferName.PerformanceCounters);

System_CAPS_warningWarning

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
Weergeven: