Profile live Azure App Service apps with Application Insights

Profiler currently works for ASP.NET and ASP.NET Core apps that are running on Azure App Service. The Basic service tier or higher is required to use Profiler. Enabling Profiler on Linux is currently only possible via this method.

Enable Profiler for your app

To enable Profiler for an app, follow the instructions below. If you are running a different type of Azure service, here are instructions for enabling Profiler on other supported platforms:

  • [Cloud Services](../../azure-monitor/app/ ?toc=/azure/azure-monitor/toc.json)
  • [Service Fabric Applications](../../azure-monitor/app/ ?toc=/azure/azure-monitor/toc.json)
  • Virtual Machines

Application Insights Profiler is pre-installed as part of the App Services runtime, but you need to turn it on to get profiles for your App Service app. Once you have deployed an app, even if you have included the App Insights SDK in the source code, follow the steps below to enable the profiler.

  1. Go to the App Services pane in the Azure portal.
  2. Navigate to Settings > Application Insights pane.

    Enable App Insights on App Services portal

  3. Either follow the instructions on the pane to create a new resource or select an existing App Insights resource to monitor your app. Also make sure the Profiler is On.

    Add App Insights site extension

  4. Profiler is now enabled using an App Services App Setting.

    App Setting for Profiler

Disable Profiler

To stop or restart Profiler for an individual app's instance, under Web Jobs, go to the app resource. To delete Profiler, go to Extensions.

Disable Profiler for a web job

We recommend that you have Profiler enabled on all your apps to discover any performance issues as early as possible.

If you use WebDeploy to deploy changes to your web application, make sure you exclude the App_Data folder from being deleted during deployment. Otherwise, the Profiler extension's files are deleted the next time you deploy the web application to Azure.

Next steps