Start monitoring an ASP.NET application or web site
Application Insights is in preview.
Add Application Insights to your application to monitor its availability, performance, and how people use it. You’ll be notified if it runs slowly or throws exceptions, or is unavailable. And you’ll be able to find out which features are most popular and which are difficult to use.
If you want to quickly diagnose the performance of a web application on an IIS server without rebuilding it, go to Monitoring a web application without updating the code.
But for the best experience, stay with this topic and add the Application Insights SDK into your application project. You need Visual Studio 2013. If you have the Ultimate or Test edition, you’ll be able to create more detailed availability tests.
Application Insights works with a variety of types of web services. If you want to apply it to other types of app, go to Monitor a Windows Store or Windows Phone app.
This is about the older version of Application Insights in Visual Studio Online. There’s a new version in Microsoft Azure.
The Application Insights Tools simplify some of the set-up.
Open Tools, Extensions and Updates.
Select Installed. If there is a version 2.* of Application Insights Tools, delete it. (The 2.* versions send data to the Azure version of Application Insights.)
Search on "Application Insights".
Install Application Insights Tools for Visual Studio, version 1.*. (The 1.* versions send data to the Visual Studio Online portal.)
Everyone on your team should install the tools.
If you already have a C# or Visual Basic web application: Add Application Insights to the web app project.
If you’re creating a new C# or Visual Basic web application: Just create the new project the way you usually do. You’ll see some extra options in the New Project dialog. Make sure Add Application Insights is checked.
If you haven’t yet set up a Visual Studio Online account, or if you haven’t connected to your account yet, you’ll see some extra dialogs that help you do that.
If you are using Visual Studio 2012 add Application Insights SDK manually to your project.
Run your application in debug mode (F5). Try some simple navigations between pages.
In Solution Explorer, in the context menu of the web project, choose Open Application Insights portal.
Your browser will open (after a security confirmation) on a dashboard that shows a tile like this:
Data from your application should show up within seconds. (If it doesn’t, take a look at Troubleshooting.)
Click the tile for a more detailed view. Or at any time, you can go to DIAGNOSTICS, Streaming data and select your application.
The Streaming page is used only in development, to verify that the right data is getting to Application Insights. Stream data is only shown when your active build configuration is set to Debug.
After a few minutes, go to USAGE to see the first processed results. If you see a configuration page instead of data, wait a few minutes and refresh the page. Here’s an example page of first results:
Learn more about tracking usage.
Once you’ve coded your application, deploy it in the usual way, either to an IIS server or to Microsoft Azure Cloud Services. In Application Insights, you’ll be able to see how many people are using your app.
Usually you set your solution’s build configuration to Release before publishing. In that case, data will no longer appear on the Streaming page.
Availability Tests – Open the Availability page to set up tests that notify you if your website becomes unavailable or responds slowly.
Monitor performance and exceptions – Watch how your application responds under load, diagnose any issues with resources, get stack traces if there are exceptions, and be notified of issues when they arise.