AZURE CLOUD PLATFORM -Application Insights (Article 14)

Hi! Guys welcome to the continuous article set of my Azure cloud platform based on the shared cloud architecture. This is my 14th article. You can visit my previous articles from the below links:

Application Insights, a feature of Azure Monitor, is an extensible Application Performance Management (APM) service for developers and DevOps professionals. Use it to monitor your live applications. It will automatically detect performance anomalies, and includes powerful analytics tools to help you diagnose issues and to understand what users actually do with your app. It’s designed to help you continuously improve performance and usability. It works for apps on a wide variety of platforms including .NET, Node.js, Java, and Python hosted on-premises, hybrid, or any public cloud. It integrates with your DevOps process, and has connection points to a variety of development tools. It can monitor and analyze telemetry from mobile apps by integrating with Visual Studio App Center.

You install a small instrumentation package (SDK) in your application or enable Application Insights using the Application Insights Agent when supported. The instrumentation monitors your app and directs the telemetry data to an Azure Application Insights Resource using a unique GUID that we refer to as an Instrumentation Key.

You can instrument not only the web service application, but also any background components, and the JavaScript in the web pages themselves. The application and its components can run anywhere — it doesn’t have to be hosted in Azure. In addition, you can pull in telemetry from the host environments such as performance counters, Azure diagnostics, or Docker logs. You can also set up web tests that periodically send synthetic requests to your web service. All these telemetry streams are integrated into Azure Monitor. In the Azure portal, you can apply powerful analytic and search tools to the raw data.

Let’s create it…..

First select create resource in the side navigation panel and search for Application Insights and click create option.

Then fill out the form and create your Insights.

After that click your application insight instance and you can see your instrumentation key and we will use it later to our application code.

Now install the Application Insights SDK in your app. Next Use the instrumentation key to configure the SDK that you install in your application.

To create a resource automatically type the following command in your powershell and change them according to your details.

New-AzApplicationInsights [-ResourceGroupName] <String> [-Name] <String> [-Location] <String> [-Kind <String>]
[-Tag <Hashtable>] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

To access the preview Application Insights Azure CLI commands, first run

az extension add -n application-insights

If you don’t run the az extension add command, you will see an error message az: ERROR: az monitor: ‘app-insights’ is not in the ‘az monitor’ command group. See ‘az monitor — — help’.

Now you can run the following to create your Application Insights resource:

az monitor app-insights component create — app — location — resource-group [ — application-type] [ — kind] [ — tags]

That’s it :)

This is the end of Article 14 and hope you get a brief idea about Application Insights and how to create it practically.

Will see you on my next article Azure Firewall.

Thank You!

B.Sc in Software Engineering (Honors)