Failures and performance views
Application Insights collects telemetry from your application to help diagnosing failures and investigating slow transactions. It includes two essential tools:
The Failures experience, which tracks errors, exceptions, and faults, offering clear insights for fast problem-solving and enhanced stability.
The Performance experience, which quickly identifies and helps resolve application bottlenecks by displaying response times and operation counts.
Together, these tools ensure the ongoing health and efficiency of web applications. You can use them to pinpoint issues or enhancements that would have the most impact on users.
To get to the Failures view in Application Insights, select either the Failed requests graph on the Overview pane, or Failures under the Investigate category in the resource menu.
You can also get to the failures view from the Application Map by selecting a resource, then Investigate failures from the triage section.
Overview
The Failures view shows a list of all failed operations collected for your application with the option to drill into each one. It lets you view their frequency and the number of users affected, to help you focus your efforts on the issues with the highest impact.
Investigate
To investigate the root cause of an error or exception, you can drill into the problematic operation for a detailed end-to-end transaction details view that includes dependencies and exception details.
Select an operation to view the Top 3 response codes, Top 3 exception types, and Top 3 failed dependencies for that operation.
Under Drill into, select the button with the number of filtered results to view a list of sample operations.
Select a sample operation to open the End-to-end transaction details view.
Note
The Suggested samples have related telemetry from all components, even if sampling was in effect in any of them.
End-to-end transaction details
The End-to-end transaction details view shows a Gantt chart of the transaction, which lists all events with their duration and response code. Selecting a specific event reveals its properties, including additional information like the underlying command or call stack.
Debug Snapshot
To see code-level debug information of an exception:
Select the exception in the Gantt chart, then Open debug snapshot.
Snapshot Debugger shows the call stack and allows you to inspect variables at each call stack frame. By selecting a method, you can view the values of all local variables at the time of the request.
Afterwards, you can debug the source code by downloading the snapshot and opening it in Visual Studio.
Create a work item
If you connect Application Insights to a tracking system such as Azure DevOps or GitHub, you can create a work item directly from Application Insights.
Select Create work item and create a new template or pick an existing one.
The New Work Item pane opens with details about the exception already populated. You can add more information before you save it.
Use analytics data
All data collected by Application Insights is stored in Log Analytics, which provides a rich query language to analyze the requests that generated the exception you're investigating.
Tip
Simple mode in Log Analytics offers an intuitive point-and-click interface for analyzing and visualizing log data.
On either the performance or failures view, select View in Logs in the top navigation bar and pick a query from the dropdown menu.
This takes you to the Logs view, where you can further modify the query or select a different one from the sidebar.
Profiler traces
The .NET Profiler helps get further with code-level diagnostics by showing the actual code that ran for the operation and the time required for each step. Some operations might not have a trace because the Profiler runs periodically. Over time, more operations should have traces.
To start .NET Profiler, select an operation on the Performance view, then go to Profiler traces.
Alternatively, you can do so on the end-to-end transaction details view.
The trace shows the individual events for each operation so that you can diagnose the root cause for the duration of the overall operation. Select one of the top examples that has the longest duration.
Select the link in the Performance Tip (in this example, CPU time) for documentation on interpreting the event.
For further analysis, select Download Trace to download the trace. You can view this data by using PerfView.
Note
Hot path is selected by default. It highlights the specific path of events that contribute to the issue you're investigating, indicated by the flame icon next the event name.
Analyze client-side performance and failures
If you instrument your web pages with Application Insights, you can gain visibility into page views, browser operations, and dependencies. Collecting this browser data requires adding a script to your web pages.
After you add the script, you can access page views and their associated performance metrics by selecting the Browser toggle on the Performance or Failures view.
This view provides a visual summary of various telemetries of your application from the perspective of the browser.
For browser operations, the end-to-end transaction details view shows Page View Properties of the client requesting the page, including the type of browser and its location. This information can assist in determining whether there are performance issues related to particular types of clients.
Note
Like the data collected for server performance, Application Insights makes all client data available for deep analysis by using logs.
Next steps
- Learn more about using Application Map to spot performance bottlenecks and failure hotspots across all components of your application.
- Learn more about using the Availability view to set up recurring tests to monitor availability and responsiveness for your application.