Application Insights is a set of tools within Azure Monitor. These tools allow you to view the performance of your application or service quickly and to review detailed information to determine the causes of an incident.

It works by collecting and reading metrics, telemetry data, and logs.

Using Application Insights, we can view application performance in real time, test for uptime, measure feature usage, and determine when a problem occurred.

There are two ways to enable Application Insights for a service or application. In many cases, you can simply turn on the feature when you create the service or after it is running. If the service does not support automatic collection of Application Insights data, you can use an SDK to add code to your application that logs data.

For Azure App Services and Azure Functions on Windows running .NET code, Application Insights is on by default and enabled automatically.

See Fig. 1

Supported Environments
Fig. 1

Source: https://learn.microsoft.com/en-us/azure/azure-monitor/app/codeless-overview#supported-environments-languages-and-resource-providers

Note: For scenarios that are not supported, you can write code to log Application Insights data.

You can explicitly turn on or off Application Insights and configure its settings when you create a new Web App in the Azure Portal by selecting the "Monitoring" blade, as shown in Fig. 2.

Monitoring Blade
Fig. 2

If you change your mind after creating an App Service, you can still enable Application Insights later. Within the App Service, click the [Application Insights] button under the "Settings" section of the left menu, as shown in Fig. 3.

Application Insights Button
Fig. 3

Fig. 4 shows the "Application Insights" blade for an App Service in which Application Insights is not enabled.

Application Insights Blade with App Insights Turned Off
Fig. 4

Click the [Turn on Application Insights] button to display the "Application Insights" dialog, as shown in Fig. 5.

Application Insights Dialog
Fig. 5

Here you can enable Application Insights and configure it how you desire.

In this article, I showed how to enable Application Insights for an App Service. In future articles, I will explain and demonstrate some of the features provided by Application Insights.