So maybe you’ve been hearing some buzz around Application Insights (referred to as AI after this because I’m lazy). I first heard of it a year or so ago when it was in Preview. Well, technically it is STILL in Preview, but if you’re running VS 2013 Update 3 or newer you may have noticed a slight facelift in the tooling. I wanted to get my hands into it so I could experience it for myself, and my experience was so awesome I figured I’d share. So if you’ve stuck with me this far and are wondering, “what the heck IS AI anyway?”, it’s like Google Analytics on steroids. But like, get kicked out of MLB steroids.
So to get started you’ll need Visual Studio 2013, the VS 2013 add-ons that support AI, and either access to a web application that you can deploy with the AI telemetry installed, or an MSDN subscription or a personal Azure account so you can easily create and publish your own web app. If like me you are NOT a developer, but still want to see what AI can do for your organization with a super simple web application, I also included a link to a How To article for getting a web app up and running in Azure really quickly.
Getting started with Azure and ASP.NET
How to: Migrate and Publish a Web Application to an Azure Cloud Service from Visual Studio
Application Insights Tools for VS
At this point I had my super simple ASP.NET web application deployed to an Azure website, and can even monitor the Azure website from within Visual Studio in the Server Explorer. Nice, right? I know.
And right now it’s FREE to host my website on Azure too. I have a really simple site that doesn’t require a lot of resources, so that may not always be the case, but if you’re just evaluating Azure and/or AI this is a really nice way to get there! More pricing can be found here on azure websites if you’re interested in learning more.
Now, before I move on I want to make something clear, it doesn’t matter where your application code is, or where it is hosted. There is a common misconception that you can only leverage AI if you are using VSOnline for your application development and SCM. And I don’t want to imply from my example that hosting in Azure is required either. Azure was just the fastest, easiest, and cheapest way for me to publish my web application, and heck, as a bonus I got some experience publishing to Azure. My source code is stored in an on-premise TFS server, but it could be anywhere. What is important is that the telemetry data is configured to send information to the AI dashboards, which are currently available through the VSOnline portal. So at a minimum you will need access to a VSOnline instance.
Even before adding any telemetry to your application in VS, you can setup a new Application Insights dashboard against any existing website and start getting some limited data points back. Just look for the link on your VSOnline Homepage under Recent Dashboards, create a new dashboard, and add the application URLs to be monitored.
Perhaps starting at the dashboard was a bit backwards, I’ll admit to often charging ahead on new tools to figure it out as I go rather than reading the instructions first, but luckily the AI tools do a great job of walking you through everything you need to do to “light up” the different sections. In some cases, it requires adding small snippets of code the the HTML of the web pages you wish to monitor, for other metrics you may be required to install the MMA tool on your server (assuming you have the ability to do this).
So without all the fancy telemetry tools deployed with your app, there is not much on your dashboard yet. But without any additional configuration, it will at least start pinging your website on regular intervals to ensure it is up and running and to pull back some response time data. Pretty neat huh? But I want more data!
You also may have noticed that so far I’ve actually been leveraging the OLD AI dashboard experience instead of leveraging the Azure portal experience. For now, regardless of which portal you use to set up your AI dashboard, it will be available in both the old and new portals. I personally found it easier to start in the old experience, and once the basics were configured I then jumped into the new portal to dig into the data. You may also find that you need the old portal if you are testing one of the few application types not yet supported by the new AI, more details here.
Given how much ground we covered in this session, I wanted to let all of this marinate before diving deeper into AI capabilities, and walking through some of the detailed metrics that can be pulled from your application. Truth be told, I’m still tweaking my configuration, processing data, and figuring out what it all means. Seriously, check out some of the awesome data I am able to dig through in the new AI portal:
So, stay tuned for my next post, where we really get deep into the data weeds using Application Insights!