Uredi

Enable the .NET Profiler for Azure Functions apps

Application Insights Profiler for .NET captures performance traces from your live app so you can pinpoint the code paths that slow down requests.

This article shows you how to use the Azure portal to enable the .NET Profiler for an Azure Functions app that runs on the App Service plan.

In this article, you use the Azure portal to:

  • View the current app settings for your Functions app.
  • Add two new app settings that enable the .NET Profiler on the Functions app.
  • Open the Profiler page for your Functions app to view trace data.

Note

You can enable the Application Insights Profiler for .NET for Azure Functions apps on the App Service plan.

Prerequisites

App settings to enable the .NET Profiler

App Setting Value
APPLICATIONINSIGHTS_CONNECTION_STRING Unique value from your Application Insights resource.
APPINSIGHTS_PROFILERFEATURE_VERSION 1.0.0
DiagnosticServices_EXTENSION_VERSION ~3

Add app settings to your Azure Functions app

In the Azure portal, open your Functions app Overview page:

  1. Under Settings, select Environment variables. Verify that the settings list includes the APPLICATIONINSIGHTS_CONNECTION_STRING setting.

    Screenshot showing the Application Insights connection string setting in the list.

  2. Select Add.

    Screenshot outlining the Add button for application settings.

  3. Copy each setting name and its Value from the preceding table into the corresponding fields. Add APPINSIGHTS_PROFILERFEATURE_VERSION with the value 1.0.0 and DiagnosticServices_EXTENSION_VERSION with the value ~3.

    Screenshot adding the Application Insights profiler feature version setting.

    Screenshot adding the diagnostic services extension version setting.

    Leave the Deployment slot setting blank for now.

  4. Select Apply for each value.

  5. In the Environment variables pane, select Apply, then Confirm.

    Screenshot outlining the continue button in the dialog after saving.

The app settings now show up in the table:

Screenshot showing the two new app settings in the table on the configuration pane.

Note

You can also enable the .NET Profiler by using:

Next step