Configure Application Insights Profiler
To open the Azure Application Insights Profiler settings pane, select Performance from the left menu within your Application Insights page.
View profiler traces across your Azure resources via two methods:
Profiler button
Select the Profiler button from the top menu.
By operation
Select an operation from the Operation name list ("Overall" is highlighted by default).
Select the Profiler traces button.
Select one of the requests from the list to the left.
Select Configure Profiler.
Once within the Profiler, you can configure and view the Profiler. The Application Insights Profiler page has these features:
Feature | Description |
---|---|
Profile Now | Starts profiling sessions for all apps that are linked to this instance of Application Insights. |
Triggers | Allows you to configure triggers that cause the profiler to run. |
Recent profiling sessions | Displays information about past profiling sessions, which you can sort using the filters at the top of the page. |
Profile Now
Select Profile Now to start a profiling session on demand. When you click this link, all profiler agents that are sending data to this Application Insights instance will start to capture a profile. After 5 to 10 minutes, the profile session will show in the list below.
To manually trigger a profiler session, you'll need, at minimum, write access on your role for the Application Insights component. In most cases, you get write access automatically. If you're having issues, you'll need the "Application Insights Component Contributor" subscription scope role added. See more about role access control with Azure Monitoring.
Trigger Settings
Select the Triggers button on the menu bar to open the CPU, Memory, and Sampling trigger settings pane.
CPU or Memory triggers
You can set up a trigger to start profiling when the percentage of CPU or Memory use hits the level you set.
Setting | Description |
---|---|
On / Off Button | On: profiler can be started by this trigger; Off: profiler won't be started by this trigger. |
Memory threshold | When this percentage of memory is in use, the profiler will be started. |
Duration | Sets the length of time the profiler will run when triggered. |
Cooldown | Sets the length of time the profiler will wait before checking for the memory or CPU usage again after it's triggered. |
Sampling trigger
Unlike CPU or memory triggers, the Sampling trigger isn't triggered by an event. Instead, it's triggered randomly to get a truly random sample of your application's performance. You can:
- Turn this trigger off to disable random sampling.
- Set how often profiling will occur and the duration of the profiling session.
Setting | Description |
---|---|
On / Off Button | On: profiler can be started by this trigger; Off: profiler won't be started by this trigger. |
Sample rate | The rate at which the profiler can occur.
Normal is recommended for production environments. |
Duration | Sets the length of time the profiler will run when triggered. |
Recent Profiling Sessions
This section of the Profiler page displays recent profiling session information. A profiling session represents the time taken by the profiler agent while profiling one of the machines hosting your application. Open the profiles from a session by clicking on one of the rows. For each session, we show:
Setting | Description |
---|---|
Triggered by | How the session was started, either by a trigger, Profile Now, or default sampling. |
App Name | Name of the application that was profiled. |
Machine Instance | Name of the machine the profiler agent ran on. |
Timestamp | Time when the profile was captured. |
Tracee | Number of traces that were attached to individual requests. |
CPU % | Percentage of CPU that was being used while the profiler was running. |
Memory % | Percentage of memory that was being used while the profiler was running. |