Web application metrics with Application Insight

I began using Application Insights from Microsoft earlier this week and have to admit that I’m pretty impressed with it. Early on during the development cycle when I was implementing our Web API services, I knew I wanted some sort of monitoring tool that would give me regular feedback on various metrics such as the number of requests, response times, availability, failures etc. I initially began looking at Fiddler as this can be automated to provide much of these sorts of metrics. However, these metrics were primarily concerned with HTTP traffic, whereas I also wanted data on availability / performance across varying thresholds.

So I began looking at Application Insights. This is an extensible Application Performance Management service for web applications. It can be used to monitor live web applications to provide diagnostics and performance metrics. Exactly what I was looking for.

Application Insights can be added to your Visual Studio project if you want to write your own customised metrics, or you can simply install the Status Monitor on your server to capture run-time data on your web application. The latter option doesn’t require any re-compile or re-deployment to your web application. Simply install and go.

Although our web services are implemented using the ASP.NET stack, Application Insights also works with Node.js and J2EE stacks too. It can be used on-premise or in the cloud, and can be integrated with your devOps process. So it’s highly flexible and configurable.

Thus far I’ve configured metrics for availability, request / response rates, ping tests, failure rates and usage. These can be configured to run as often as necessary. For example, I have my ping tests set to run daily at 5 minute intervals. If there is an interruption to this, then I’ll be immediately notified.

This provides real-time metrics and diagnostics on our endpoints, giving us timely and regular feedback on their health. Importantly, it also gives us feedback when we roll out new versions of our web services. Should there be a dip in response times for example, then we will get immediate feedback so we can diagnose the underlying issue, and rollback if necessary.

Application Insights provides exhaustive and extensible monitoring tools for your web applications, and I’m very impressed with how easy it was to configure them. All you need is an Azure account and you’re good to go.

A father, cyclist, vegetarian, atheist, geek and multiple award winning technical author. Loves real ale, fine wine and good music. All round decent chap.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store