Enable Profiler for Azure Cloud Services
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.
- Make sure you've set up diagnostics for Azure Cloud Services.
- Use .NET Framework 4.6.1 or newer.
Track requests with Application Insights
When publishing your CloudService to Azure portal, add the Application Insights SDK to Azure Cloud Services.
Once you've added the SDK and published your Cloud Service to the Azure portal, track requests using Application Insights.
- For ASP.NET web roles, Application Insights tracks the requests automatically.
- For worker roles, you need to add code manually to your application to track requests.
Configure the Azure Diagnostics extension
Locate the Azure Diagnostics diagnostics.wadcfgx file for your application role:
Add the following
SinksConfig section as a child element of
<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>
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.
Learn how to...