Enable the .NET Profiler for Azure Cloud Services

You can receive performance traces for your instance of Azure Cloud Services by enabling the Application Insights Profiler for .NET. The Profiler is installed on your instance of Azure Cloud Services via the Azure Diagnostics extension.

In this guide, you learn how to:

  • Enable your instance of Azure Cloud Services to send diagnostics data to Application Insights.
  • Configure the Azure Diagnostics extension within your solution to install the .NET Profiler.
  • Deploy your service and generate traffic to view Profiler traces.

Prerequisites

Track requests with Application Insights

When you publish your instance of Azure Cloud Services to the Azure portal, add the Application Insights SDK to Azure Cloud Services.

Screenshot that shows the checkbox for sending information to Application Insights.

After you've added the SDK and published your instance of Azure Cloud Services to the Azure portal, track requests by using Application Insights:

Configure the Azure Diagnostics extension

Locate the Azure Diagnostics diagnostics.wadcfgx file for your application role.

Screenshot that shows the diagnostics file in the Azure Cloud Services solution explorer.

Add the following SinksConfig section as a child element of WadCfg:

<WadCfg>
  <DiagnosticMonitorConfiguration>...</DiagnosticMonitorConfiguration>
  <SinksConfig>
    <Sink name="MyApplicationInsightsProfiler">
      <!-- Replace with your own Application Insights instrumentation key. -->
      <ApplicationInsightsProfiler>00000000-0000-0000-0000-000000000000</ApplicationInsightsProfiler>
    </Sink>
  </SinksConfig>
</WadCfg>

Note

The instrumentation keys that are used by the application and the ApplicationInsightsProfiler sink must match.

Deploy your service with the new Diagnostics configuration. Application Insights Profiler for .NET is now configured to run on your instance of Azure Cloud Services.

Next steps

Note

On March 31, 2025, support for instrumentation key ingestion will end. Instrumentation key ingestion will continue to work, but we'll no longer provide updates or support for the feature. Transition to connection strings to take advantage of new capabilities.