Azure Application Insights Tutorial

Azure Application Insights Tutorial

In this Azure article, we will discuss the Azure Application Insights Tutorial, and along with that, we will also discuss a few other topics, as mentioned below.

Azure Application Insights Tutorial

Let’s discuss here a complete tutorial on Azure Application Insights. But, before that, we should aware of What exactly is Azure Application Insights?.

What is Application Insights in Azure

Azure Application Insights is an excellent feature that helps you monitor the performance of your live web applications. That’s how you can ensure your critical web applications run without issues.

Azure Application Insights supports two types of monitoring

  1. Monitoring without code or Codeless Monitoring
  2. Monitoring with Code or Code based Monitoring

Monitoring without code or Codeless Monitoring

  • No modification of code is required here to monitor your application.
  • Work for Applications already hosted in the Azure cloud, like Azure Web App, App services, etc.
  • Configure Azure Application Insights from the Azure Portal itself. Not even a single line of code is required.

Monitoring with Code or Code based Monitoring

  • Monitor the applications built using JAVA, Python, ASP.NET Core/Framework, Node.JS, etc.
  • A few lines of code need to be added to implement the code-based monitoring.
  • It would be best to integrate Application Insights into your Application with a few lines of code.

Features of Azure Application Insights

Below is a list of key features of Azure Application Insights.

  • Closely monitors the performance of your live web applications.
  • Diagnose the issues concerning your web applications faster with the help of Azure Application Insights.
  • It helps you to improve the usability of your web applications.
  • Check the activities of your users with respect to your web applications.
  • It supports multiple platforms like Python, Java, .NET, etc.
  • Seamless integration with DevOps and different development tools.
  • Works on on-premises, cloud environments, and even hybrid environments.

What exactly does Azure Application Insights monitor?

  • Azure Application Insights reports different exceptions with respect to your servers and browsers.
  • Provides you with the rates of requests and failures.
  • The response time.
  • Provides you with the trace logs from your applications.
  • Your browser performance.
  • The counts for your sessions and users.
  • The network, memory, and CPU usage of your server machines.

How to create Azure Application Insights?

It’s straightforward to start with the Azure Application Insights. Below are the prerequisites needed to start with Azure Application Insights.


Assuming you are ready with the prerequisites, let’s start with the steps to create Azure Application Insights.

  1. Log in to the Azure Portal.
  2. Search for “Application Insights” and then click on the search result “Application Insights”.
application insights tutorial

3. Click the + Create or Create Application Insights app button to create the Azure Application Insights resource.

azure app insights tutorial

4. On the Application Insights window, provide the below details

  • Subscription: Choose a valid Azure subscription that you want to use to create the Application Insights.
  • Resource Group: Select an existing resource group or click on the Create new link to create a new resource group.
  • Name: Provide a unique name for your Azure Insights.
  • Region: Select the location or region.
  • Resource Mode: Select the Resource mode.
  • Subscription: Select a valid Azure subscription.
  • Log Analytics Workspace: Choose an existing Log Analytics Workspace or use the default one.

Then click on the Review + Create button.

azure application insights

5. Now, on the next screen, it will validate all the details you entered and show you the Validation Passed message. Click on the Create button to create the Azure Insight Analytics.

It will take a few seconds to show you your deployment is complete. Click the Go to Resource button to navigate to the Azure Insight Analytics you created.

application insights example

How to enable Application Insights for your Web App?

Follow the below steps to configure Application Insights for your web applications.

  1. Navigate your Web App in Azure Portal and click on the Overview tab.
  2. Click on the Application Insights option as highlighted below.
application insights example

3. Sometimes, it might be enabled by default for you. Or, if you can see the button “Turn on Application Insights,”. Click on that to enable the Application Insights for your WebApp.

You can choose to Enable to collect application monitoring data using Application Insights.

Expand the Change your resource option.

How to enable Application Insights

4. You can either create a new Application Insights resource or you can select an existing Application Insight resource.

To create a new resource, select the “Create a new resource” option.

  • New resource name: Provide a unique name for your resource.
  • Location: Choose the location or region.
  • Log Analytics Workspace: Choose the Log Analytics workspace or select the default one.
azure application insights

5. Scroll slightly down, and you can see the Instrument your application section. You can choose the respective tabs, like .Net, .Net Core, Node.js, Jave, Python, etc., based on your application type and requirements.

As part of my requirement and this demo perspective, I am choosing .Net and the configurations below.

  • Collection level: Select Recommended.
  • Profiler: Select On if you want to collect the Profiler traces.
  • Snapshot Debugger: This option is recommended to select as On, which will help you collect call stacks for your application when an exception is thrown. This option helps you to fix the exceptions quickly.
  • SQL Commands: Make it On or Off based on your requirement.
application insights azure
what is application insights in azure

6. Click the Apply and Yes buttons to save the monitoring settings.

how to use application insights

Now, it will show the changes are applied, and the Deployment succeeded.

You can navigate to the newly created Application Insights to see the details on the monitoring data like failed requests, Server response time, Server requests, Availability, etc.

You may also like following the articles below

Wrapping Up

This article has discussed a complete tutorial on Azure Application Insights. Create your Azure Application Insights and monitor the performance of your application now.