4

We have enabled Application Insights for an Azure Web App. The following highlighted Application Insights automatically added to the app service even after deleted manually. Is there anyway to permanently disable/delete this?

Application Insights Job

Azure App Insights - Console log

NOTE: We have configured Scale Out (Max: 10 instances) for the App Service.

Arasu RRK
  • 1,078
  • 16
  • 28

3 Answers3

4

It seems that the old extension was not properly removed when you enabled the new experience. Even though the App Service doesn't show the "Microsoft.ApplicationInsights.AzureWebSites" extension as being installed, the extension is still there and periodically writes ApplicationInsightsProfiler2.

To solve the problem open Kudu and remove this entire folder: "D:\home\SiteExtensions\Microsoft.ApplicationInsights.AzureWebSites".

You might get an access denied (some of the files might be loaded in the running process). If that happens you have 2 options:

  1. Stop the App Service and try removing the folder again.
  2. Only remove "D:\home\SiteExtensions\Microsoft.ApplicationInsights.AzureWebSites\applicationHost.xdt" & "D:\home\SiteExtensions\Microsoft.ApplicationInsights.AzureWebSites\scmApplicationHost.xdt" and then restart the AppService. Now the extension is not used anymore and you can safely remove the entire folder.
Claudiu Guiman
  • 837
  • 5
  • 18
  • Currently this issue is occurs in production. I'll try to remove the extension from the maintenance time – Arasu RRK Feb 06 '19 at 05:28
  • Removing the *.xdt files is safe and doesn't impact the running application. – Claudiu Guiman Feb 06 '19 at 14:29
  • We had issues with services not starting due to csc.exe timing out after 10 minutes. Removing `ApplicationInsightsProfiler2` seems to have resolved it. – a_hardin Aug 02 '19 at 13:05
1

Open Kudu in your web app and browse till wwwroot

enter image description here

and then browse to Continuous folder under Jobs - D:\home\site\wwwroot\App_Data\jobs\continuous>

Check if you see any folder name ApplicationInsightsProfiler2. If yes then delete it.

It worked for me.

Mohit Verma
  • 5,140
  • 2
  • 12
  • 27
0

Open Kudu Console: https://YOURWEBAPP.scm.azurewebsites.net/DebugConsole

To remove the WebJob from the Kudu dashboard:

rmdir /s /q D:\home\site\wwwroot\App_Data\jobs\continuous\ApplicationInsightsProfiler2

Remove the old applicationinsights folder:

rmdir /s /q D:\home\SiteExtensions\Microsoft.ApplicationInsights.AzureWebSites

Any locked files can be removed manually one by one without needing to stop the WebApp service.

OzBob
  • 4,227
  • 1
  • 39
  • 48