How to collect performance counters of your Cloud Services

A performance counter can be added to your cloud service for either Azure Diagnostics or Application Insights.
For more information: https://docs.microsoft.com/en-us/azure/cloud-services/diagnostics-performance-counters

My steps of Azure Diagnostics:

  1. Open your Cloud Service project in Visual Studio. Go to WebRole’s Properties.

  2. In Properties page -> Click “Configure -> Go to “Performance Counters” Tab -> Add performance counters. For example: \LogicalDisk(C:)% Free Space and \LogicalDisk(C:)\Free Megabytes

  3. Configure a storage account for the Diagnostics results:

  4. Publish the Cloud Service Project into your Cloud Service.

  5. Get the performance counters data from Storage Account Table:

HTH. 2021-3-24 By Jacky