I am beginning to implement Application Insights against an ASP.NET web app with multiple deployments; Prod, Staging, Dev, Dev2. Currently the production slot is sitting empty with deployments in staging, dev and dev2.
The application health tile is showing requests made to the home page of Prod but really I want to see the telemetry for staging, dev and dev2. Is it possible to use 1 Application Insights resource for all slots within my Web App or do I have to create a separate Application Insights for each slot?
You can extend your telemetry with custom properties which will indicate your environment, and then slice and dice according to that property, using either Metric Explorer or Analytics.
You can read more here: Application Insights support for Multiple Environments, Stamps and App Versions, specifically the 'Multi Stamp Support'.
I have resolved the issue. I was enabling Application Insights through the portal for an already deployed application, which only seems to enable telemetry collections for what is deployed in the 'main' production slot. In my case this was the default 'This web app has been successfully created' blue landing screen. Despite my 3 other deployment slots having apps deployed, no data was collected for these.
In order to allow collection for all slots, return to Visual Studio and configure Application Insights through there. You can then redeploy the application to whichever deployment slot you wish and the OOTB telemetry collection will happen.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With