Do you know how to set up Application Insights?
Rules to Better Application Insights|637d94ab-1ce2-4f3b-af50-3486460624b5
v13.0
Posted at
3/03/2017 6:07 AM by
Tiago Araujo
Page Content
An overview of the setup steps Application Insights requires that you make 2 general modifications to your application:
- On the client side, manually add a Javascript tracker to your web page header (i.e. by placing directly on each page or through a "master page" or "layout template"), this modification enables the "browser page loading time" monitor and can track client-side exceptions:

- Browser side stats have been enabled with the JavaScript tracker
- On the server side, add the Application Insights DLL references and update web.config, these modifications enable the "server response time", "server request" and "failed requests" monitors. This step can either be done within Visual Studio when right-clicking on a project in Solution Explorer, but it can also be done with the server monitoring tool on ASP.NET applications you don't have control over (e.g. SharePoint).

- Server side stats have been enabled now that it has been added to the ASP.NET pipeline
Tip #1 – Add enhanced Exception tracking to your application
The default set up and configuration of Application Insights will send generic performance stats and Exceptions. If you will be using Application Insights to look deeper into these Exceptions then it is important to make sure the full stack trace is sent when Exceptions occur. This can be added to your application by adding code for all unhandled exceptions. Follow this documentation page for more information https://azure.microsoft.com/en-us/documentation/articles/app-insights-asp-net-exceptions/
Tip #2 – Add Web tests to monitor performance metrics over time
As soon as you have configured Application Insights, you should immediately add a web test to track the general performance trends over time. More information can be found at this rule https://rules.ssw.com.au/do-you-add-web-tests-to-application-insights-to-montior-trends-over-time
Tip #3 – What if you don't have the source code of your ASP.NET application
This rule on how to add Application Insights to a SharePoint application shows that you can use the Application Insights monitor to add the .dlls and modify the web.config file of a deployed application https://rules.ssw.com.au/application-insights-in-sharepoint
Set up Application Insights;Application Insights;
{623A361D-A06E-443C-A6C7-D15C203E2D0D}
Do you feel this rule needs an update?