Application and App Monitoring with Microsoft Application Insights

Application and App Monitoring with Microsoft Application Insights

Overview

The Visual Studio team recently released an application monitoring tool called Application Insights (preview) for Visual Studio Online. If you have an Azure account with subscription for Visual Studio Online, you can request a limited preview of the Application Insights platform, that allows you to monitor the performance, availability, usage and diagnostic aspects of not just web, but services, Windows Phone, Windows Store, and Azure PaaS based applications and apps.

Configuring Application Insights (On Premise)

Application Insights primarily consists of the Monitoring Agent that you need to install for on premise Windows Servers. During installation, you need to specify the Account Id, and the Instrumentation Key. The Agent installer provides three options. Use the Application Insights for Visual Studio Onlineoption to surface the monitoring data of your applications on premise to be collected and analysed in Visual Studio Online.


Figure 1: Monitoring Agent Setup

Note that, IIS Management Tools and Scriptsis a pre-requisite for installing the monitoring agent.

Configuring Application Insights (Azure PaaS)

For Windows Azure PaaS based applications, you need to modify the deployment configuration files in your Windows Azure project. A step by step guide is provided, if you select Add an Applicationfrom the Application Insights page under Visual Studio Online. Answer the questions presented by the Wizard as shown in Figure 2, and you will reach the step by step instructions.


Figure 2: Wizard Driven Interface to Add a New Application for Monitoring

You will need to download the instrumentation tool and extract the files to be placed into the AppInsightsAgentfolder inside your web role. You then need to add a Startup Task to launch the instrumentation bootstraps (unifiedbootstrap.bat file). Deploy the application, and the metrics will start showing up in the site.

Measuring Availability with Synthetic Monitors

Application Insights allows you to provide the application URL as a ping request that can then monitor performance, availability and functionality using the tool called Synthetic Monitor. You can create multiple synthetic monitors, and create a single URL test, or a multi-step test using a Visual Studio Web Test file as shown in Figure 3.


Figure 3: Multi-step Synthetic Monitor

Analysing Usage with Telemetry SDK

The Telemetry SDK with Application Insights allows you to surface usability patterns of the deployed application. You can download the Telemetry SDK using NuGet and then start using the ServerAnalytics.Start method to allow Application Insights to start capturing usage data.

using Microsoft.ApplicationInsights.Telemetry.Services; public override bool OnStart() {    ServerAnalytics.Start("");     return base.OnStart();}

The above code sample, demonstrates enabling the analytics on a Worker Role.

You can also use the SDK to log KPIs for important events occurring inside your application. The method ServerAnalytics.CurrentRequest.LogEvent will help you log events and surface them under Feature –> Events in the Application Insights site.

Diagnostics

The Application Insights portal also lets you diagnose issues and exceptions as they are recorded by the monitoring agent. You can navigate to the Diagnostics page and see the events as they occur as illustrated in Figure 4.


Figure 4: Diagnostics using Application Insights

Summary

Application Insights is a very promising and powerful utility to monitor the performance, function and usability of a wide range of applications and apps, and the journey that started from IntelliTrace finally seems to have unified the application monitoring and diagnostics experience under one roof.

Share the Post:
XDR solutions

The Benefits of Using XDR Solutions

Cybercriminals constantly adapt their strategies, developing newer, more powerful, and intelligent ways to attack your network. Since security professionals must innovate as well, more conventional endpoint detection solutions have evolved

AI is revolutionizing fraud detection

How AI is Revolutionizing Fraud Detection

Artificial intelligence – commonly known as AI – means a form of technology with multiple uses. As a result, it has become extremely valuable to a number of businesses across

AI innovation

Companies Leading AI Innovation in 2023

Artificial intelligence (AI) has been transforming industries and revolutionizing business operations. AI’s potential to enhance efficiency and productivity has become crucial to many businesses. As we move into 2023, several

data fivetran pricing

Fivetran Pricing Explained

One of the biggest trends of the 21st century is the massive surge in analytics. Analytics is the process of utilizing data to drive future decision-making. With so much of

kubernetes logging

Kubernetes Logging: What You Need to Know

Kubernetes from Google is one of the most popular open-source and free container management solutions made to make managing and deploying applications easier. It has a solid architecture that makes

ransomware cyber attack

Why Is Ransomware Such a Major Threat?

One of the most significant cyber threats faced by modern organizations is a ransomware attack. Ransomware attacks have grown in both sophistication and frequency over the past few years, forcing

data dictionary

Tools You Need to Make a Data Dictionary

Data dictionaries are crucial for organizations of all sizes that deal with large amounts of data. they are centralized repositories of all the data in organizations, including metadata such as