Application Insights – Part 5: Troubleshooting Failures with Application Insights

This series of blog posts will tell you everything you need to know about application insights.

Part 1: The Basics
Part 2: Is Application Insights really that “easy to add”?
Part 3: Is Application Insights really that “easy to use”?
Part 4: Application Monitoring with Application Insights
Part 5: Troubleshooting Failures with Application Insights
Part 6: Troubleshooting Performance Problems with Application Insights
Part 7: Availability Monitoring and Web-Testing with Application Insights
Part 8: Extending the Power of Application Insights with Glimpse and PowerBI

 

Part 5: Troubleshooting Failures with Application Insights

This post explores how Application Insights can be used to investigate application failures. We will take a look at the failures blade of our application and drill down until we can identify the problem and ultimately end up at the application call stack.

Lets start with failures.  The Application Insights blade shows a button for failures:

Failures1_thumb[1]

The button takes us to a chart that shows the failures observed during a time period. We can see the number of failed requests, failed dependencies, failed HTTP calls, server exceptions and total requests:

Failures2_thumb[1]

Below the chart we can find a list of the failed requests and the involved web service operations. We immediately see that the GET call to the wife resource has a serious problem. 99.6% of all the calls failed.

Failures3_thumb[1]

Further down we can see the number of failed calls to dependencies and the recorded exceptions grouped by type. The dependency failure list shows us all the calls to others, such as third party webservices, that failed. We find that the DirectionService API failed on every request in the monitored time frame and that we have a large number of exceptions. Lets drill down into the System.Exception row.

Failures4_thumb[1]

By drilling down into the System.Exceptions row we are directed to a blade that shows us the exceptions of the selected type over time. Along with the number of exceptions we can find out how many users have been affected by this exception type.

Failures5_thumb[1]

Further down we get the list of all the exceptions that have been recorded by the process instrumentation. By double clicking on a row we drill into the exception and can see the application call stack that lead to the exception under investigation.

Failures6_thumb[1]

 

Failures8_thumb[1]

In addition to the exception call stack we can always drill across and take a look at other possibly related telemetry events. We see that we had one request that has been affected by this instance of the exception. In addition, we have 9 telemetry events recorded in the context of the user session associated with the request. If we want to investigate the time before and after the request, Application Insights provides us with a link to a list of all the events recorded 5 minutes before and 5 minutes after the exception.

Failures9_thumb[1]

Drilling down even further will take us to the application call stack including line numbers, exactly as we know it from visual studio:

Failures10_thumb[1]

In the next post, we explore how to troubleshoot performance problems with Application Insights.

Part 6: Troubleshooting Performance Problems with Application Insights