Application Insights for Sitecore (or, where have my logfiles gone?)

With Sitecore’s new Azure PaaS offering, you might’ve noticed in your Azure resource group that there’s an Application Insights resource there.

Application Insights can be used to monitor the live web applications and helps with diagnosing issues and figuring out what users are doing with your app. More information here. Application Insights is quite a big and powerful tool, and I won’t be able to cover everything juts quite yet. I will however run through some of the cool features.


Even by itself that’s a pretty cool (and useful) tool to have. But the Application Insights have actually also been integrated with Sitecore.

In the Application Insights overview blade we can get some additional information by clicking the Search button. We can filters the results there as well, by type (such as trace, request or page view) or property. For Sitecore’s log entries we are interested in the Trace filter.


To query the log files in more depth, we can actually hit the Analytics button in that same overview blade. This will open a new window, where we can begin writing queries to find issues logged in our Sitecore logs.


Any of the properties you see in the bottom right we can filter on – you can find those properties on the left hand side as well, in the Schema. There’s also some very useful documentation on writing queries.

In the Performance blade, I can also create my own charts based on Sitecore statistics, as well as see how my application is performing.


We can also do things like set up alerts when there’s over 5 server exceptions in the application (see image below), and if this happens send an email to the administrators.


This type of reactive analytics isn’t the only thing you can do with Application Insights though – we can use some more advanced, proactive features. In the linked document, it states “For example, if your app loads slowly on some OS versions, or has slower responses in particular geographical location, you’ll get an email about it. Proactive Detection uses machine learning and data mining to help you find issues that would be hard to detect – and are often only discovered when customers complain.”

For more information about this type of diagnostics, see this Microsoft documentation.

Lastly, there’s also the Application Map, which allows you to see a diagram of your setup, showing the dependencies of your components.


By clicking through on the various components, we can see which parts of our setup are working correctly and which have issues. As you can see in the image above, there seems to be something wrong with my search. I can then click through on that to see some detailed information.


By clicking through on in the chart, I can also see even more detail (in the below image, I clicked the ‘Dependency Failures’ chart)


From there I can then even create a new Work Item, either in Visual Studio Team Services or in GitHub, making sure the Work Items have all relevant data embedded.

I’ve covered only a small portion of what Application Insights can do for us, but I do hope I’ve shown its power and its usefulness. I’m pretty excited, in any case 🙂


2 thoughts on “Application Insights for Sitecore (or, where have my logfiles gone?)

  1. Pingback: The brave new world of Azure PaaS | Jeremy Davis

  2. Pingback: Sitecore on Azure… With Unicorn | Sitecore and such

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.