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.
Table of Contents
- Azure Application Insights Tutorial
- What is Azure Application Insights?
- Features of Azure Application Insights
- What exactly does Azure Application Insights monitor?
- How to create Azure Application Insights?
- How to enable Application Insights for your Web App?
- Wrapping Up
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 Azure Application Insights?
Azure Application Insights is an excellent feature that helps you to monitor the performance of your live web applications. That’s how you can make sure your critical web applications are up and running without any issues.
Azure Application Insights supports two types of monitoring
- Monitoring without code or Codeless Monitoring
- 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 the Applications that are 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 that are 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.
- You need to integrate Application Insights in 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 with respect to your web applications faster with the help of Azure Application Insights.
- 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 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 really easy to start with the Azure Application Insights. Below are the prerequisites needed to start with Azure Application Insights.
- You must have an Azure subscription or Azure account. If you don’t have it till now, create an Azure free account now.
Assuming you are ready with the prerequisites, let’s start with the steps to create Azure Application Insights.
- Log in to the Azure Portal.
- Search for “Application Insights” and then click on the search result “Application Insights”.
3. Click on the + Create button or Create Application Insights app button to create the Azure application Insights resource.
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 you can 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 you can use the default one.
Then click on the Review + Create button.
5. Now on the next screen it will validate all the details entered by you and will show you Validation Passed message. Click on the Create button to create the Azure Insight Analytics.
It will take a few seconds and then will show you, that your deployment is complete. Click on the Go to resource button to navigate to the Azure Insight Analytics that you have created.
How to enable Application Insights for your Web App?
Follow the below steps to configure Application Insights for your web applications.
- Navigate your Web App in Azure Portal and click on the Overview tab.
- Click on the Application Insights option as highlighted below.
3. Sometimes, it might be enabled by default for you. Or, if you can able to see a button “Turn on Application Insights”. Click on that to enable the Application Insights for your WebApp.
You can choose Enable if you want to collect application monitoring data using Application Insights.
Expand the Change your resource option.
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 you can select the default one.
5. Scroll slightly down and you can able to see the Instrument your application section, you can choose the respective tabs like .Net, .Net Core, Node.js, Jave, Python, etc based on the type of your application and your requirement.
Here as part of my requirement and this demo perspective, I am choosing .Net then the below configurations.
- 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 that will help you to collect call stacks for your application when an exception is thrown. This option really helps you to fix the exceptions quickly.
- SQL Commands: Make it On or Off based on your requirement.
6. Finally, click on the Apply button and then click on the Yes button to save the monitoring settings.
Now, it will show the changes are applied and 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 below articles
- How to Create a Recovery Services vault in Azure
- How to create an Azure web app using PowerShell
- What VPN Types are Supported By Azure
- 7 Key Benefits of Microsoft Azure + Azure for Business
- How to Upload and Download File From Azure Blob Storage Using C# and PowerShell
Well, in this article, we have discussed a complete tutorial on Azure Application Insights. Create your Azure Application Insights and monitor the performance of your application now.