One of the great features of Application Insights is the capability to monitor IIS websites and web services. It uses an agent installed on the IIS server to send telemetry data to Azure Application Insights running in Azure.
In this blog I will setup monitoring of a published BizTalk schema as a WCF service hosted on the server running BizTalk.
First you will need a Microsoft Azure Subscription. Logon to Azure and create a new Application Insight service as shown below. Set the Application Type to ASP.Net web application. This will install the default IIS template on the dashboard for monitoring web sites and web services. You also have the option to add additional monitoring of the other metrics available or delete the existing ones added by the template.
Note the location of the data store can only be set to Central US at this time. When the blade is created, the default template will look very similar to below.
Once the service has been created, you will need the generated Instrumentation Key which is available from the properties blade.
Next download the Status Monitor from https://azure.microsoft.com/en-us/documentation/articles/app-insights-monitor-performance-live-website-now/ and install it on your BizTalk server which has IIS installed. Execute the file Microsoft.Diagnostics.Agent.StatusMonitor.exe from the default installed location c:\Program Files\Microsoft Application Insights\Status Monitor.
When it comes to selecting the published WCF service and the telemetry subscription, you will get the following error shown below.
This is because the monitor application cannot read the web.config file in the web service directory created by BizTalk. The namespace added to the Configuration element highlighted below must be temporary removed and the Monitor application executed again to correctly read the web.config file.
After the Monitor application has been executed with the namespace removed, it will successfully update the web.config file and add the ApplicationInsights.config to the web service folder. Remember to add the namespace back into the web.config file.
If you open the ApplicationInsights.config file you will see the instrumentation key already inserted under the element called InstrumentationKey.
Now when you start sending requests to the WCF web service endpoint, you will start seeing metrics being captured under the Performance investigation option as shown below.
Also you have the capability to create alerts and to setup monitoring of other metrics if you so desire.
Enjoy.