Adding Application Insights
This is really easy, but I still see confusion when automating deployment of environments through IaC. If you are using Application Insights to monitor your web application, and you are using ARM to deploy to multiple environments to enable the differentiation of testing and production this should be really easy, yet for some reason people struggle.
Lets just examine what we are trying to achieve. Basically we need to deploy an Azure Application Insights instance and an Azure Web App and tie them together. There are various ways to connect an web app to app insights, but the easiest way is through web.config app settings. So in a continuous integration / deployment environment ideally we would create the resources only when required, and destroy them after that requirement has been fulfilled and ideally we would have no keys saved within source control.
Posted By Keith Drew on 13/05/2017