Application Insights In Azure

Introduction
  • Application Insights is a Performance Management Service(PMS) for web developers.
  • It keeps track of application performance.
  • It uses powerful analytics tool help us to diagnose the issue.
Application-Insight-Architecture
Application-Insight-Architecture


 How to create Application Insights

Go to Create Resources -> IT &Management Tools->Application Insights



Create-Application-Insights
Create Application Insights

How to set application insights to Web-App

Open the Web App --> Application Insights-->Select the enable option -> Select the App insight if created else select the create new resource-> Click on Apply Button.


See the below image



Configure-Application-Insights
Configure-Application-Insights


Once Configuration is done you can see the telemetry data of Web app will be displayed.


How Web app connected with App-Insights





When ever we create an App insight resource it generate a key called Instrumentation Key.

When we configure the app-insights with web-app then instrumentation key will be added to the application settings of the Web APP, which help to connect both the resources.

Application setting name is APPINSIGHTS_INSTRUMENTATIONKEY and the value is the instrumentation key value.



View Telemetry data


Go to Web app->Application Insights->View Application Insights Data


We can check the below metrics.




  • Live metrics Streams- We can see the live data like Incoming ,outgoing,Overall health of an application.
  • Availability- We can check the availability % of the server.
  • Failure-We can check the failure count and where got failed.
  • Performance-How much time its getting for the server to Get or Post request
  • Alerts  - Generate alert based up on the above matrices and condition , and what action need to be taken if the condition satisfied.
Log-Analytics-Data
Log-Analytics-Data

Benefits


  • Used to Diagnose the issue while running in server.
  • Check the Availability of the application.
  • Check the performance of the application.
  • We get the alert when any changes happen by setting alert condition.
  • Integrate this with all variety of application to check the application health.





Share:

Azure Logic App

What is Logic App


  • Azure Logic app allows developers to design workflows.
  • It Integrates Apps and data across the cloud and on-premise.
  • Azure Logic App is a cloud service that helps you schedule, automate, and orchestrate tasks, business processes, and workflows when you need to integrate apps, data, systems, and services across enterprises or organizations.
  • Logic app articulate intent via a trigger and series of steps, each invoking an App Service API app.


How To Create Logic App

To create a Logic app follow the below steps.


  • Login to Azure Portal.
  • Create a resource-->Web-->Logic App
  • Fill the details and click Create to create a logic app resource.
Fig-1
Logic App creation
Create-Logic-App
Create Logic-App


Design a flow using logic apps

  • Go to newly created Logic App say 'mytestlogicapp'.
  • Go to Logic App Designer.
  • We can see many numbers of template .
  • Choose the Blank Logic App Template.
  • After clicking Blank Template you can see the below connectors and triggers as shown below.

Fig-2

Logic-App-Connectors
Logic App Connectors

Lets take an example .

When a mail come to the inbox it will be auto reply to the sender.

Lets see this in action.


Setup email reply to the incoming mail

In the portal as shown in the above image search for gmail and click it .
You can see the below image.


Fig-3

Logic-App-G-Mail-connector
Logic App G-Mail connector


In the above image fill the From field to where reply mail need to be send.

Add a new step shown in the portal just below the above image.

then fill the details as below.
Fig-4


Logic-App-Auto-Reply-Email
Logic App Auto Reply Email

The above image suggests reply to the mail from where email came.
Save the 


Test the above scenario

  • Send a mail to the register gmail from the above mentioned mail. 
  • The mail trigger in 3 minutes as mentioned in the fig-3.
  • We will receive a reply mail in 3 minutes.

Logic App Run History

We can check the run history to check how many times the mail trigger and success and failure rate.
Run History can be found Under Overview ->Run History

See the below image.

Fig-5

Logic-App-Run-History
Logic App Run History


How Logic App Works

Each time logic app trigger fires(lets say 3 min) the logic app create a logic app instance that run the action in the workflow and execute the logic app.

Things to remember

  • Logic App used to create an workflow used to required job done when the required action happened.
  • It contains 200 connectors to build the workflow.
  • Logic app used consumption based pricing model.

Share:

Azure Function Using Portal

Introduction to Azure Function



•Azure Functions is one implementation of Server-less Architecture also known as 

Functions as a Service (FaaS).

In Azure Functions there are no virtual machines (VMs) to manage.

•In Azure function A number of discrete functions live inside a Function app.

It run either in a consumption plan or App Service plan.


Create Function App

Go to Create a Resources->Search for Function App->Create

Figure-1

Create-Function-App
Create Function App










Figure-2


Create-Function-App
Create Function App

Function App will be created with the name MyNewAzureFunApp as shown above.
Lets create a function Under the function app.

Select the function app called MyNewAzureFunApp  and then select In-Portal as shown in Figure-3.



Figure-3

Create-Function
Create Function

Select Timer or Select More template and select timer trigger and give a name to the timer and time interval when the timer will trigger.  as shown in Figure -4



Figure -4
Create-Function
Create Function


Function(TimerTrigger1) will be created under the function app.



Function and the files


Find the newly created function and file in below figure-5 and figure-6.




Figure-5


Function-details
Function details





                                                                        Figure-6



Function-Files
Function Files
Function Integration


In Figure-7 select the integration link.



                                                                    Figure-7


Function-Integration
Function Integration












  • Select the Outputs.
  • Select the Azure Blob Storage.
  • Install the template dependency if not installed.
  • Set the Blob Parameter name . In my case i set outputBlob.
  • Save the Details.
  • Go to TimeTrigger1 and add the below code.

using System;public static void Run(TimerInfo myTimer,string out outputBlob, ILogger log){ log.LogInformation($"C# Timer trigger function executed at: {DateTime.Now}"); outputBlob="test function";}

  • Save and Run the function.


Check the blob storage after every 1 min  as we given the execution time 1 minutes.
 Each minute a new blob will be created with the “Test function” printed.
Each execution Log will be generated which will be visible below the screen when we select the function created.


How to Disable Or Delete Function 

Select the Function App(MyNewAzureFunApp)-> Select Functions->Disable or Delete the function.


Things to Note


  • Azure function add advanced feature compared to Web Job.
  • It run max 5 min so used to run small piece of code.
  • Pay ₹13.220 per million execution.
  • It is called server-less as no charges will be there till there is no execution .



                                                                      



Share:

Contact for Azure Training

Name

Email *

Message *

Subscribe YouTube

Total Pageviews

Popular Posts

Labels

Recent Posts