Step-by-step guide to set up Azure Application Insights for your Azure App Service

Marvin Conejo
3 min readApr 13, 2023

Azure Application Insights is a cloud-based service provided by Microsoft Azure that helps you monitor, diagnose, and improve the performance and availability of your web applications and services. It provides you with insights into your application’s usage, performance, availability, and user behavior, enabling you to identify and fix issues before they impact your customers.

Step 1: Create an Application Insights resource

  1. Log in to the Azure portal and select “Create a resource” from the left-hand menu.
  2. Search for “Application Insights” and select it from the list of services.
  3. Click on “Create” and fill out the required information for the resource, such as name, subscription, resource group, and location.
  4. Click on “Review + create” and then “Create” to create the resource.

Step 2: Enable Application Insights for your Azure App Service

  1. Go to the Azure App Service that you want to monitor with Application Insights.
  2. Click on “Application Insights” under the Monitoring section of the left-hand menu.
  3. Select the Application Insights resource that you created in Step 1 from the dropdown menu.
  4. Click on “Enable” to enable Application Insights for your App Service.

Step 3: Configure Application Insights

  1. Go back to your Application Insights resource in the Azure portal.
  2. Click on “Configure” in the left-hand menu.
  3. Select the “Application settings” tab.
  4. Scroll down to the “Instrumentation key” section and copy the value of the “Instrumentation Key”.
  5. Go back to your App Service in the Azure portal.
  6. Click on “Configuration” under the Settings section of the left-hand menu.
  7. Add a new setting with the name “APPINSIGHTS_INSTRUMENTATIONKEY” and paste the Instrumentation Key value you copied in Step 4 as the value.
  8. Click on “Save” to save the configuration changes.

Step 4: View Application Insights data

  1. Go to your Application Insights resource in the Azure portal.
  2. Click on “Overview” in the left-hand menu.
  3. Select the “Live Metrics Stream” tab to view real-time data about your App Service.
  4. Select the “Application Map” tab to see a high-level view of the components of your App Service.
  5. Select the “Performance” tab to view detailed information about the performance of your App Service.

That’s it! You’ve now set up Azure Application Insights for your Azure App Service.

--

--

Marvin Conejo

I am an experienced Azure architect with a deep understanding of cloud computing and a strong focus on the Azure