Application Insights - Net Developers - Live Metrics - Features

Application Insights – Analyze live traffic using Live Metrics

In the previous article 6 steps to integrate Application Insights with .Net Core application hosted in Azure App Service, we have learnt how to integrate Azure Application insights with a .Net Core WEB API.

Advertisements

In this article, we will learn about Live Metrics feature of Azure Application Insights.

Note: Live Metrics works only

  1. If you have created a new Application Insights and not yet integrated with any application yet.
  2. If the application is not on-line and is not currently serving the requests.
  3. If the application is using the older version of Application Insights SDK <2.6
  4. In case if your application is running in an On-Prem environment, make sure you allow the related ports. Refer the official documentation for more information about the ports. https://docs.microsoft.com/en-us/azure/azure-monitor/app/ip-addresses#outgoing-ports
Advertisements

Otherwise, you would see something as shown below.

Application Insights - Net Developers - Live Metrics
Application Insights – Net Developers – Live Metrics
Advertisements

Live Metrics provide you the live traffic information, Errors and some telemetry information about the application(s) associated with the Application Insights service.

Below is the information that you can get from Live Metrics.

Application Insights - Net Developers - Live Metrics - Features
Application Insights – Net Developers – Live Metrics – Features
Advertisements

Each of the above features are displayed in a collapsible pane. Each section displays the data for the last 60 seconds. The request data after 1 minute will be discarded. It doesn’t store any historical data.

Incoming Requests

This section shows all the information about Incoming requests.

Advertisements
  1. Request Rate – Number of requests that the application is receiving.
  2. Request Duration – The average request duration time
  3. Request Failure Rate – The failures in the last 60 seconds

Below is the screenshot which shows all the above information.

4. Application Insights - Net Developers - Live Metrics - Request Rate

Outgoing Requests

This section shows all the information about Outgoing requests. In general, all the outgoing requests are dependency calls.

Advertisements
  1. Dependency Call Rate – Number of Dependency / outgoing calls that our application is making per second.
  2. Dependency Call Duration – The response time of the dependency service. In the below screenshot, it was a a request to a Storage Account.
  3. Dependency Call Failure Rate – Exceptions / Failures if any.
Application Insights - Net Developers - Live Metrics - Outgoing Request
Advertisements

Servers

This section provides some important insights (like CPU %, number of requests per server etc.) about the number of servers in which your application is running. In the below screen capture, it shown three servers which are online.

The below screenshot shows two servers (1st and 3rd) created for Azure Functions and one (2nd) for App Service Web App.

Application Insights - Net Developers - Live Metrics - Servers
Application Insights – Net Developers – Live Metrics – Servers

In case if you don’t see all the fields shown in the above screenshot, you can click on the Select Columns drop down and choose the fields that you are interested in as shown above.

Advertisements

Overall Health

This section provides overall health of the servers in which the application(s) are hosted.

Sample Telemetry

This section displays the live telemetry as shown below. This view doesn’t get refreshed automatically. In case if you don’t see your logs, click on the <X new> button shown below.

Application Insights - Net Developers - Live Metrics - Sample Telemetry

Choosing any of the logs shown above will show more details in the below section as shown below.

Application Insights - Net Developers - Live Metrics - Sample Telemetry Details
Application Insights – Net Developers – Live Metrics – Sample Telemetry Details
Advertisements

The Telemetry logs can also be filtered based on the Server. Below are two examples.

Filter all the Web Server Logs

As shown below, I have selected App Service’s server. The Sample Telemetry shows only the Live Traffic logs related to App Service

Application Insights - Net Developers - Live Metrics - Sample Telemetry Details - App Service
Application Insights – Net Developers – Live Metrics – Sample Telemetry Details – App Service
Advertisements

Filter all the Azure Function Logs

As shown below, I have selected Azure Functions’ server. The Sample Telemetry shows only the Live Traffic logs related to Azure Functions.

Application Insights - Net Developers - Live Metrics - Sample Telemetry Details - Azure Functions
Application Insights – Net Developers – Live Metrics – Sample Telemetry Details – Azure Functions

When you have multiple services, this feature of filtering the telemetry based on the server will definitely be helpful for troubleshooting the errors and fixing them quickly.

Advertisements

That’s it, we have learnt how to leverage the Live Metrics feature of Application Insights.

Note: Live Metrics are displayed instantly, however, the other telemetry is not shown immediately, it might take 2 to 5 minutes. The reason for this is that that Live Metrics Stream and the regular Telemetry use different Application Insight’s Channels. More on the Application Insight Channels will be discussed in the upcoming articles. Stay tuned 🙂

Advertisements

Happy Learning.

Do you like this article? If you want to get more updates about these kind of articles, you can join my Learning Groups

WhatsApp

Telegram

Advertisements
Advertisements

One comment

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s