Gustyn
Gustyn

Reputation: 2154

No Metrics displayed in Application Insights for a Application deployed to a Virtual app

We are attempting to use MS Application Insights in a Web API deployed to a virtual application in an Azure App Service. Currently this app service is deployed using Deployment Slots.

The following conditions are true:

  1. ApplicationsInsights.config is being successfully deployed as verified by opening the app's console in the Azure Portal.
  2. A second app deployed to a separate app service and with separate instrumentation key (otherwise configuration is identical) works perfectly.

The only differences other than instrumentation key are as follows: 1. The API is deployed as a virtual application (defined in ApplicationSettings: Virtual Applications and directories) as app /1.0 to directory site\api10 2. The app service is hosted in a deployment slot called UAT.

I am suspicious the issue occurs because (a) it is a virtual app or (b) is deployed to a deployment slot.

Any insights would be greatly appreciated.

Upvotes: 0

Views: 642

Answers (1)

Bruce Chen
Bruce Chen

Reputation: 18465

According to your description, I created my development slot and configure the "Virtual applications and directories" in "SETTINGS > Application settings" of my Web App on Azure Portal as follows:

Site URL: http://bruce-chen-001-staging01.azurewebsites.net/

Then I followed this tutorial about instrumenting the Web API using Application Insights. After created the project, I deployed my app to a deployment slot of my Azure Web App.

Also, I checked my web content has been deployed to Azure successfully via KUDU.

Browser the following link and wait for a moment, then I could get my metrics as follows:

http://bruce-chen-001-staging01.azurewebsites.net/staging01/api/values

In summary, please try to check your steps and find whether you are missing something.

Upvotes: 1

Related Questions