Krish DEV

Krish DEV

Keerati Limkulphong

One good small thing a day


AZ-400 Exam Preparation: Azure Application Insights (Metrics)

Published a month ago

4 minutes read

The content is summarised from AZ-400 official document

1. Introduction

  • App Insights is a feature of Azure Monitor
  • Application Performance Management
  • Can be enabled without making any changes to code (Codeless attach)
  • Custom events collection

DevOps: Monitor and fix before the users started to complain


2. Enable Application Insights on an Azure web app

2.1 What is App Insights?

  • captures events and metrics
  • events: technical events or user actions
  • metrics: like how many videos are viewed in an hour)

You need to set instrumentation key to the app, so it can send ata to App Insights

2.2 Visualizations

  • Live metrics streams: near-real time charts
  • Metrics explorer
  • Alerts
  • Profiler: You can use these profiles, for example, to see which page elements load slowly.
  • Application Map: Displays the components of an application and how they link to each other. You can use the data shown with each component to diagnose performance bottlenecks and failure hotspots.
  • Usage analysis: You can see numbers of unique users and sessions and information about user retention.

Diagram Application Insight's relationship to incoming data from client, server and background services and to various outputs.

2.3 Runtime instrumentation and build-time instrumentation

  • runtime instrument: without sdk, just need to enable app insights in Azure portal
  • build-time instrumentation: with sdk, can get more info. (Code change)
    • add custom events

Client-side instrumentation captures information about the user experience of the app, including page load times, details of browser exceptions, and performance data about AJAX calls.

2.4 Web app requirements

Runtime instrumentation and automatic client-side instrumentation is supported only on Windows web apps, because this feature relies on IIS. For Linux, you need to add SDK (Build-time instrumentation).

2.5 Enabling runtime instrumentation

If you choose to create a web app without enabling Application Insights, you can enable it later on the Application Insights page of the web app's pane.

2.6 Enabling automatic client-side telemetry

add a new application setting in App Service named APPINSIGHTS_JAVASCRIPT_ENABLED and set the value to true.


3. View Application Insights metrics in the Azure portal

The web app sends its telemetry data to the Application Insights resource, where it's stored for analysis.

When you make changes to a dashboard in Azure, other dashboard users won't see the changes until you publish them.

This default application insight dashboard is generated by Azure

Screenshot of a sample Default Application Insights dashboard displaying lots of different metrics.


Recommended Posts

AZ-400 Exam Preparation: Well-Architected Framework - Operational excellence

AZ-400 Exam Preparation: Well-Architected Framework - Operational excellence

Exam preparation for AZ-400, in the topic of Well-Architected Framework - Operational excellence

Read more →

Published a month ago

AZ-400 Exam Preparation: Introduction to App Center

AZ-400 Exam Preparation: Introduction to App Center

Exam preparation for AZ-400, in the topic of Azure App Center

Read more →

Published a month ago

AZ-400 Exam Preparation: Analyze infrastructure with Azure Monitor Logs

AZ-400 Exam Preparation: Analyze infrastructure with Azure Monitor Logs

Exam preparation for AZ-400, in the topic of Analyze infrastructure with Azure Monitor Logs

Read more →

Published a month ago

AZ-400 Exam Preparation: Control and organize Azure resources with Azure Resource Manager

AZ-400 Exam Preparation: Control and organize Azure resources with Azure Resource Manager

Exam preparation for AZ-400, in the topic of Control and organize Azure resources with Azure Resource Manager

Read more →

Published a month ago

imkrish.com KrishDEV © 2020