Search icon
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Hands-On Azure for Developers

You're reading from  Hands-On Azure for Developers

Product type Book
Published in Nov 2018
Publisher Packt
ISBN-13 9781789340624
Pages 606 pages
Edition 1st Edition
Languages
Author (1):
Kamil Mrzygłód Kamil Mrzygłód
Profile icon Kamil Mrzygłód

Table of Contents (24) Chapters

Preface 1. Azure App Service 2. Azure WebJobs 3. Deploying Web Applications as Containers 4. Distributed Applications and Microservices with Service Fabric 5. Using Azure Search 6. Mobile Notifications with Notification Hub 7. Serverless and Azure Functions 8. Integrating Different Components with Logic Apps 9. Swiss Army Knife - Azure Cosmos DB 10. Reactive Architecture with Event Grid 11. Using Azure Storage - Tables, Queues, Files, and Blobs 12. Big Data Pipeline - Azure Event Hub 13. Real-Time Data Analysis - Azure Stream Analytics 14. Enterprise Integration - Azure Service Bus 15. Using Application Insights to Monitor Your Applications 16. SQL in Azure - Azure SQL 17. Big Data Storage - Azure Data Lake 18. Scaling Azure Applications 19. Serving Static Content Using Azure CDN 20. Distributing Load with Azure Traffic Manager 21. Tips and Tricks for Azure 22. Assessments 23. Other Books You May Enjoy

Using Application Insights to Monitor Your Applications

Azure is not only about developing an application. Once we have our solution deployed to the cloud, we have to somehow monitor and diagnose it. The Azure Application Insights service offers a complete toolset for maintaining your applications, with SDKs available for multiple languages and platforms, alerts, query language, and integration with many native Azure services. It simplifies logging in to applications and gets rid of multiple sources of truth when it comes to analyzing an issue using data from several places.

The following topics will be covered in this chapter:

  • Using the Azure Application Insights service
  • Monitoring different platforms
  • Using the Analytics module
  • Automating Azure Application Insights

Technical requirements

To perform the exercises in this chapter, you will need:

  • An Azure subscription
  • Visual Studio with the following workloads installed—ASP.NET,web development, and Azure development

Using the Application Insights service

One of the most important features when developing applications (especially hosted in the cloud) is the ability to easily monitor them and detect at an early stage any possible issues and flaws. To do so, you need a whole architecture of loggers, storage, and report tools, which you have to integrate, configure, and maintain daily. This requires an additional set of skills in your team and, of course, takes time—the bigger your application is, the more is required. With Azure Application Insights, all those operations are much simpler: you have a single service and endpoint for logging all required information, and the rest is done for you automatically.

Logging data in the cloud

...

Monitoring different platforms

The strength of Azure Application Insights is its ability to monitor simultaneously from different platforms. You can choose from ASP.NET pages, Java, Node.JS, or even Python or Ruby (however, there are some languages and frameworks officially supported by Application Insights teams and some are supported by the community). The point is, it is platform-agnostic. When you, in fact, need the implementation of the communication channel, with an instrumentation key you can easily send data to an instance of a service without additional keys and an extended configuration. In this section, we will focus on sending information from different platforms, so you will be able to start integration in your projects easily on your own.

.NET

...

Analytics module

Multiple ways to integrate Azure Application Insights with different services (as well as a custom application) is not the only big feature of this service. Another important and crucial thing is the analytics language available in the Analytics module. It is an interactive query language, which enables you to explore logged data easily, using a simple and intuitive syntax. Another great thing about it is that you do not need any additional tools to get started—once you store traces, exceptions, or requests, it is available out-of-the-box—the only thing you need to do is write a query. In this section, we will cover both the query language and the module, so you can start writing your own queries and discover many different dimensions available in stored logs.

...

Application Insights automation

Monitoring is not something you like to spend time on on a daily basis. In fact, the more automated the service is, the better results you can get. It is always easier to let the machine look at different dimensions and find problems based on some preset rules; it will do it quicker and more carefully. In Azure Application Insights, you have many options when it comes to automation: ARM templates, alerts in the portal, or integrating external services (such as Microsoft Flow). In the last section of this chapter, you will learn how to get started with automation and make sure you focus on development, instead of log analysis and service maintenance.

Alerts

An alert is a feature which enables...

Summary

In this chapter, you learned about a monitoring solution available for Azure: Azure Application Insights. We covered things such as provisioning a resource, creating an alert, and integrating with other services. This Azure component offers many additional features besides those mentioned in the chapter—there are things such as smart detection, continuous export of data, or detailed usage logs. I strongly encourage you to explore it further on your own, as it greatly simplifies monitoring activities and resolving issues. In the next chapter, we will cover the last Azure service within the scope of this book: Azure SQL, which is a PaaS service, being an Azure version of the well-known database engine.

Questions

  1. What is needed to identify an Azure Application Insights instance and connect to it?
  2. Is it possible to use Azure Application Insights inside a Node.js application?
  3. What is the Smart Analytics module?
  4. How can you query logs stored inside Azure Application Insights?
  5. How can you automate creating alerts in the service?
  6. Is it possible to use SMS as an action for a triggered alert?
lock icon The rest of the chapter is locked
You have been reading a chapter from
Hands-On Azure for Developers
Published in: Nov 2018 Publisher: Packt ISBN-13: 9781789340624
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at €14.99/month. Cancel anytime}