How to add Application Insights to your web application

Application Insights (AI) is a fantastic logging/metrics/analytics application that Azure offers for free (unless you want to increase the longevity of your data; free is 1 week lifetime).  Not only is it extremely simple to get exceptions, requests, page load times, client-side exceptions and much more getting logged and aggregated, but it offers a UI that makes sorting through all that data appealing and dead-simple.

This article will cover the basic set up to get the most out of Application Insights for your Web Application or Web API Application.

Creating your web application

For the purpose of simplicity, and to stay in the scope of this article, your web application should be created by someone who has the following attributes:

  1. Is logged into Visual Studio with the profile that holds the subscription that connects them to Azure
  2. The profile has permissions to create resources in Azure

The reason for this is that Visual Studio will automatically create an AI application and connect it to your application.  See the AI documentation on Microsoft’s website for more information.

If the application is created in this way, the AI application is created in Azure, configuration to log out to that AI application from your application is done for you and you’re good to go.   Open the AI application and you’ll start seeing data stream in as you test and play with your application.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

Create a website or blog at

Up ↑

%d bloggers like this: