Azure Developer Immersions Application Insights

Similar documents
Azure Developer Immersions API Management

This walkthrough assumes you have completed the Getting Started walkthrough and the first lift and shift walkthrough.

Azure Developer Immersion Getting Started

Azure Developer Immersion Redis Cache

Configure App Service Authentication for Your Azure Web App

Azure Application Deployment and Management: Service Fabric Create and Manage a Local and Azure hosted Service Fabric Cluster and Application

Hands-On Lab. Windows Azure Virtual Machine Roles. Lab version: Last updated: 12/14/2010. Page 1

CAD PPE Hands-on Lab Day 1. Modern App

Introduction to the Azure Portal

Orckestra, Europe Nygårdsvej 16 DK-2100 Copenhagen Phone

Developing Intelligent Apps

Sitecore guide building a blog

Dreamweaver MX The Basics

Azure 209x Practical Exercises Overview

Sharing files and folders on OneDrive for Business

Cloud Enabling.NET Client Applications ---

Processing Big Data with Hadoop in Azure HDInsight

CHAPTER 1 COPYRIGHTED MATERIAL. Finding Your Way in the Inventor Interface

EASYHA SQL SERVER V1.0

Querying with Transact-SQL

Azure for On-Premises Administrators Practice Exercises

Provisioning Databases

NetBrain Instant Trial Edition 5.2. Quick Start Workbook

Submitting Assignments

Azure Security and Compliance Practical Exercises

InSite Prepress Portal Quick Start Guide IPP 9.0

Processing Big Data with Hadoop in Azure HDInsight

Microsoft Azure Fundamentals: Azure identity Practical Exercises

Getting started in Outlook Web App for Office 365

Oracle SQL. murach s. and PL/SQL TRAINING & REFERENCE. (Chapter 2)

Hands-On Lab New Collaboration Experiences for Development Teams using Team Foundation Server 2013 Lab version: Last updated: 11/25/2013

Course CLD221x: Enabling Office 365 Clients

Developing Microsoft Azure Solutions: Course Agenda

Hands-On Lab. Getting Started with Git using Team Foundation Server Lab version: Last updated: 12/30/2013

Course Outline. Lesson 2, Azure Portals, describes the two current portals that are available for managing Azure subscriptions and services.

Developing SQL Databases

BDM Hyperion Workspace Basics

Microsoft Cloud Workshops. Microservices and Serverless Architecture - Developer Edition Leader Hackathon guide

1. Configuring Azure and EBP for a simple demo

Applied Machine Learning

Getting Started with the Ed-Fi ODS and Ed-Fi ODS API

Installing and Configuring hopto Work. System Requirements Be sure you have these system requirements to install and use hopto Work.

Table of Contents HOL-PRT-1463

ALTIRIS Console 6.5 Overview

CaliberRM 5.1 Integration for Describe Enterprise

How to set up SQL Source Control The short guide for evaluators

Copyright 2012 Pulse Systems, Inc. Page 1 of 29

Backing Up your BellHawk Database for Problem Diagnosis

EM L04 Using Workflow to Manage Your Patch Process and Follow CISSP Best Practices

IBM Trusteer Rapport Solution Update

Databases in Azure Practical Exercises

Welcome to the CP Portal

Quick Guide to Installing and Setting Up MySQL Workbench

Where Did My Files Go? How to find your files using Windows 10

Click on OneDrive on the menu bar at the top to display your Documents home page.

Build an App From a SAP Web IDE Template. Page 1/26

Student Lab Manual MS100.1x: Office 365 Management

GeographyPortal Instructor Quick Start World Regional Geography Without Subregions, Fifth Edition Pulsipher

From the Insert Tab (1), highlight Picture (2) drop down and finally choose From Computer to insert a new image

USER GUIDE Azure Factory

SPS Commerce Dashboards & Alerts User Guide

EM L23 - Implementing Client and Server Management with Site Services Hands-On Lab

Colligo Engage Outlook App 7.1. Offline Mode - User Guide

What is OneNote? The first time you start OneNote, it asks you to sign in. Sign in with your personal Microsoft account.

Evoq 8 Content Managers Training Manual

We start by providing you with an overview of the key feature of the IBM BPM Process Portal.

QUICK REFERENCE GUIDE

Roxen Content Provider

Register by completing the form, or connecting via your GitHub or Google account.

Processing Big Data with Hadoop in Azure HDInsight

Participant Handbook

Course Outline. Developing Microsoft Azure Solutions Course 20532C: 4 days Instructor Led

Tutorial for Importing Open Green Map Sites into Google Earth

Form Customizer v3.0 Support Frequently Asked Questions (FAQs)

Introduction to IBM Rational HATS For IBM System i (5250)

Banner Documentation Bookshelf

Chapter 3 How to use HTML5 and CSS3 with ASP.NET applications

Discovering Computers & Microsoft Office Office 2010 and Windows 7: Essential Concepts and Skills

Altium Designer Viewer - Home Page

Microsoft Cloud Workshops. Enterprise-Ready Cloud Hackathon Leader Guide

How to Upgrade Your Site to the New User Interface

NetBrain Instant Trial Edition 5.1. Quick Start Workbook

Flash MP3 Player DMXzone.com Flash MP3 Player Manual

Docker on Windows Server 2016

VidBuilderFX. Open the VidBuilderFX app on your computer and login to your account of VidBuilderFX.

How To Upload Your Newsletter

2013 edition (version 1.1)

CST272 Getting Started Page 1

Creating and Updating Menu Boards

Site Owners: Cascade Basics. May 2017

Sending, Composing and Addressing a New Message:

Course Outline: Course 50466A: Windows Azure Solutions with Microsoft Visual Studio 2010

Microsoft Cloud Workshop

ORGANISING MESSAGES. In this session you will: FOCUS

Deploying the Cisco Tetration Analytics Virtual Appliance in Microsoft Azure

Organize Mail into Folders

BlueMix Hands-On Workshop Lab A - Building and Deploying BlueMix Applications

Choose OS and click on it

Enhancing PDF Documents - Adobe Acrobat DC Classroom in a Book (2015)

Developing Microsoft Azure Solutions (MS 20532)

Transcription:

Azure Developer Immersions Application Insights Application Insights provides live monitoring of your applications. You can detect and diagnose faults and performance issues, as well as discover how users are using your app. In this lab, you will create a new Application Insights instance. There is one exercise in this walkthrough: 1. Configure Application Insights for your Web App Exercise 1: Configure Application Insights for your Web App 1. In the Azure portal, click + New, select Developer Services, and find and select Application Insights (preview) in the list that appears. 2. Set the Name to rgroup. 3. Set the Resource group to rgroup. 4. Note that you might not be able to set the location to be the same as the one you ve been using so far in this lab. (At the time of writing, the list only shows a single location: Central US.) This doesn t matter your web app will send telemetry to Application Insights in the background, so it is not critical to have low latency communication. 5. Click Create. Azure will create the Application Insights instance. When this has finished, open the blade for it. (As always, you can just click the relevant icon in your resource group.) At the

top, you should see an orange banner inviting you to add the Application Insights SDK to your app. 6. If you click on the arrow, you ll see that it simply tells you to get Visual Studio to do the work for you. 7. In Visual Studio, right-click on the Rg.Web project and select Add Application Insights Telemetry. 8. In the Application Insights dialog that opens, the Send telemetry to field is a drop-down list that will show every Application Insights instance in your Azure Subscription. Select rgroup.

9. Click the Add button. This will add the Microsoft.ApplicationInsights.Web and Microsoft.ApplicationInsights.JavaScript NuGet packages to your project. It also adds entries to the Web.config file to ensure Application Insights can get access to information about what your application is doing It also adds a new ApplicationInsights.config file configuring how the SDK collects information. 10. Visual Studio is often a little behind the latest version of the Application Insights SDK, and the Azure Portal might complain, so you should right click on the Rg.Web project s References node and select Manage NuGet Packages. Select the Updates page. If an update for Microsoft.ApplicationInsights.Web is available, select it and click Update. 11. Press F5 to run the application locally. Navigate around the application a little bit. 12. Return to Visual Studio, stop debugging, and then right-click on Rg.Web and select Application Insights Search Debug Session Telemetry. This shows all of the events captured by Application Insights.

13. This verifies that events are being captured correctly, so now let s deploy to Azure. Right-click on Rg.Web and select Publish. When the Publish Web dialog appears, click the Publish button. 14. Once publication is complete, leave the page open in the browser and, in another tab, go to the Azure Portal and find your Web App. Click the Tools button on its toolbar 15. In the Tools panel, click Performance monitoring. In the Performance monitoring blade, click on Click here to collect insights into the performance of your.net applications. Then click Application Insights.

16. The Application Insights pane that opens lists all available Application Insights instances. Select your rgroup instance. Click OK in this pane and again in the next pane. This configures the Azure Web App to supply Application Insights with additional information that is not available through the SDK alone. You need to enable Application Insights in both ways. Neither the SDK nor this setting on its own can provide full information. 17. Return to the browser showing your application and navigate around the site a little more to generate some more telemetry. Make sure that the last thing you do is return to the Home page (or refresh it if you re already there) so that you can follow the next steps in this walkthrough. 18. Back in the Azure Portal, open the rgroup Application Insights instance. You should see some overview information about your application s health: 19. Notice that we seem to have some failed requests. Click on the FAILED REQUESTS section of this overview. This shows more detail about the failed requests:

The graphs show when various things happened. The horizontal position indicates the time. The failures of interest are all recent so they re over on the right. The top graph shows failed requests broken down by the operation that failed. We can see from that (as well as again in the Total of Failed requests by Operation name list further down) that the failures are GET requests attempting to get Content/design.js and lib/modernizr. 20. Let s see if we can fix that. Back in Visual Studio, select the Edit Find and Replace Find in Files (Ctrl+Shift+F) item. In Find what type Content/design.js and then click Find All.

21. This indicates that the _LayoutNoUser.cshtml file in the Views\Shared folder has a <script> tag referencing this item on line 60. Open the file. 22. That s the wrong location for the script file design.js lives in the Scripts folder, not Content. You need to adjust the URL, replacing Content with Scripts. 23. The second problem is also on this page. At line 11, you will find this: <script src="~/lib/modernizr/modernizr.js"></script> That s the wrong folder. Although there is a /lib/modernizr/modernizr.js file in the project, it does not get deployed to the server; the lib folder effectively contains source code from which the script files ultimately uploaded get generated. This should refer to the same scripts folder as the tag you just fixed further down in the file. It should look more like this: <script src="https://yourcdnendpoint.azureedge.net/scripts/modernizr.js"></script> You will have to replace YOURCDNENDPOINT with the endpoint you set up in an earlier walkthrough. If you didn t do the CDN walkthrough, just use ~/Scripts/modernizr.js. 24. Before we publish the updated web site, there s another issue. If you look at the Application Insights pane in the Azure Portal, you will see in the Application health overview that in the PAGE VIEW LOAD TIME section that there s no data, just a message: 25. Click on that Learn how to collect browser page load data label. This opens a blade with the title Client application monitoring and diagnosis. It includes a code snippet you can add to web pages. This is necessary for Application Insights to be able to measure performance inside users web browsers.

26. Copy that code. In Visual Studio, in the Rg.Web project s Views\Shared folder, open _Layout.cshtml and paste in the code snippet just after the closing </head> tag on line 14. 27. Publish the Web App again. Navigate around a bit more in the app. 28. Go back to the Azure portal. If you still have the rgroup Application Insights blade open, click the Refresh button. If you don t have it open, just open it again (no need to refresh in that case). 29. You should now find that the PAGE VIEW LOAD TIME section is showing data. Let s review what you have done. You created a new Application Insights instance to collect information about your Web App, and you configured your Web App to send diagnostic data to that instance. Virtually instantly, this revealed a problem in the app it showed that we had a couple of bad URLs leading to failed requests. You now have an overview of how the application is performing, with response time information both from the server s perspective and the client s. Last Updated: August 10, 2016.