image
Application Insights Telemetry
Start course
Difficulty
Intermediate
Duration
49m
Students
1069
Ratings
4.8/5
Description

The application lifecycle doesn’t finish with app deployment. Feedback is an important element of refining an application, whether that’s exception detection and diagnoses or improving the user experience. In this course, we will look at a suite of services that capture a vast array of feedback data, ranging from exceptions to client and server telemetry. This data can be turned into easily digestible information that can be used to trigger alerts and feedback into the development lifecycle as work items.

This course begins by describing what feedback is, and the types of feedback for improving application performance and usability. It then moves on to how we can integrate feedback into the software development lifecycle and what tools we can use to simplify that task. Finally, we will look at optimizing feedback mechanisms to get meaningful data from feedback noise.

For any feedback and questions relating to this course, please contact us at support@cloudacademy.com.

Learning Objectives

  • Designing application and user feedback loops
  • Setting up crash and event notifications for App Center
  • Setting up work item integration from App Center 
  • Making sense of App Center’s analytic and diagnostic information
  • Adding Application Insights Telemetry to an application
  • Setting up Application Insights alerts
  • Work item integration from Application Insights
  • Designing feedback dashboards
  • Viewing Application Insights Telemetry data
  • Discussing types of user feedback and how they can be captured
  • Ways to baseline and filter feedback data

Intended Audience

This course is intended for:

  • People preparing for Microsoft’s AZ-400 exam
  • App developers
  • Project managers

Prerequisites

To get the most from this course, you should have some experience with Microsoft Azure and application development, as well as knowledge of software project management concepts.

Transcript

While the App Center is great there is one glaring omission at the moment. It doesn’t cater for traditional web apps. But before there was the App Center there was, and still is, Application Insights Telemetry. Adding telemetry is very easy. From within Visual Studio select Add Application Insights Telemetry from the project menu and follow the wizard. When installed you’ll find a connection to Application Insights services, the insights package added, and an instrumentationKey added to appsettings.json. If your web app happens to be an MVC app you’ll find a reference to Application Insights Javascript snippet added to Layout.cshtml. The caveat with this very simple set up is that your Visual Studio subscription credentials are the same as, or linked with your Azure subscription. If not you will be prompted to supply them. If you are using a JavaScript framework like Angular or VueJs there are Application Insights NPM packages you can install. So, what does the telemetry tell us?

If we go to Azure and then select application insights and then pick our telemetry app which has been automatically created based on our Visual Studio project, we will get an overview dashboard. This shows us failed requests, server requests, server response time and availability. 

Now if we go to our app and do some navigating and then select live metrics stream. Let's just wait for that to boot up - here we go. If we click on a few links we can see the live data coming through. This is all well and good but what about if we have a failure. So, I’ll initiate a failed page request by asking for a non-existent path. We can see the failures coming through both graphically, and on the far right we can see the requested path that is causing the failure.

To get notified of failures we must create an alert. We do this by go down to the alerts menu item and then click create new alert. We must start with a condition which is going to trigger the alert. As you can see there's plenty of options here to choose from, but I'm interested in failed requests so I'm going to select that. We can see the number of failed requests so far. I’ll set the threshold to one and change the granularity to one minute for the purposes of demonstration. The next thing I need to do is create an Action Group. I'll name the group email failed requests, with short name email 404. You have a lot of action types to choose from, which is great from an integration point of view, but I'm just going to stick with an email message just to begin with. I’ll just enter the email details. OK and we'll just give that group a name. I need to select the group that I've just created this is a very important step, and if you don't the alerts won't work. And give the alert rule a name. I should point out that just below the description field there is a drop-down list where you can set the severity level. As you can see there have been 4 alerts in total.

 

Here we have an example of the email alert that gets sent by the telemetry service. On the right is the action type drop down list showing the other integrations you can enable. Let’s look at how you can turn Application Insight alerts into issues within Azure DevOps.

 

About the Author
Students
20995
Courses
72
Learning Paths
14

Hallam is a software architect with over 20 years experience across a wide range of industries. He began his software career as a  Delphi/Interbase disciple but changed his allegiance to Microsoft with its deep and broad ecosystem. While Hallam has designed and crafted custom software utilizing web, mobile and desktop technologies, good quality reliable data is the key to a successful solution. The challenge of quickly turning data into useful information for digestion by humans and machines has led Hallam to specialize in database design and process automation. Showing customers how leverage new technology to change and improve their business processes is one of the key drivers keeping Hallam coming back to the keyboard.