Profile live Azure Cloud Services with Application Insights

In this article

Application Insights Profiler is installed with the Azure Diagnostics extension. You just need to configure Azure Diagnostics to install Profiler and send profiles to your Application Insights resource.

Enable Profiler for Azure Cloud Services

Check to make sure that you're using .NET Framework 4.6.1 or newer. If you are using OS family 4, you'll need to install .NET Framework 4.6.1 or newer with a startup task. OS Family 5 includes a compatible version of .NET Framework by default.

The bug in the profiler that ships in the WAD for Cloud Services has been fixed. The latest version of WAD (1.12.2.0) for Cloud Services works with all recent versions of the App Insights SDK. Cloud Service hosts will upgrade WAD automatically, but it isn't immediate. To force an upgrade, you can redeploy your service or reboot the node.

If the diagnostics.wadcfgx file also contains another sink of type ApplicationInsights, all three of the following instrumentation keys must match:

The key that's used by your application.

The key that's used by the ApplicationInsights sink.

The key that's used by the ApplicationInsightsProfiler sink.

You can find the actual instrumentation key value that's used by the ApplicationInsights sink in the ServiceConfiguration.*.cscfg files.
After the Visual Studio 15.5 Azure SDK release, only 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, and Application Insights Profiler is configured to run on your service.

Next steps

Generate traffic to your application (for example, launch an availability test). Then, wait 10 to 15 minutes for traces to start to be sent to the Application Insights instance.