Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Using Application Insights with multiple deployment slots

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?

like image 227
Stephen Newell Avatar asked Jun 15 '16 11:06

Stephen Newell


2 Answers

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'.

like image 196
yonisha Avatar answered Feb 22 '23 22:02

yonisha


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.

like image 28
Stephen Newell Avatar answered Feb 22 '23 22:02

Stephen Newell