VS Application Insights for a Web App deployed to multiple environments
Here is what we did.
- Create 4 AI applications
- In our ApplicationInsights.config we set it to our development componentId.
- For Test, Stage, and Prod we use a build script that replaces the componentId and componentName based on which environment we are in.
In layout javascript get the appId:
appInsights.start("@ServerAnalytics.ApplicationInsightsId");