Enable Profiler for Azure Cloud Services

Receive performance traces for your Azure Cloud Service by enabling the Application Insights Profiler. The Profiler is installed on your Cloud Service via the Azure Diagnostics extension.

In this article, you will:

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

Pre-requisites

Track requests with Application Insights

When publishing your CloudService to Azure portal, add the Application Insights SDK to Azure Cloud Services.

Screenshot showing the checkbox for sending information to Application Insights.

Once you've added the SDK and published your Cloud Service to the Azure portal, track requests using Application Insights.

Configure the Azure Diagnostics extension

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

Screenshot of the diagnostics file in the Azure Cloud Service 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 need to match each other.

Deploy your service with the new Diagnostics configuration. Application Insights Profiler is now configured to run on your Cloud Service.

Generate traffic to your service

Now that your Azure Cloud Service is deployed with Profiler, you can generate traffic to view Profiler traces.

Generate traffic to your application by setting up an availability test. Wait 10 to 15 minutes for traces to be sent to the Application Insights instance.

Navigate to your Azure Cloud Service's Application Insights resource. In the left side menu, select Performance.

Screenshot of the Application Insights performance option in the left menu of the Azure portal.

Select the Profiler for your Cloud Service.

Screenshot of selecting the Profiler from the Cloud Service App Insights performance pane.

Select Profile now to start a profiling session. This process will take a few minutes.

Screenshot of selecting Profile Now to start a profiling session.

For more instructions on profiling sessions, see the Profiler overview.

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.

Next steps