Skip to Content
微软认证Azure开发工程师(AZ-204)考试指南
book

微软认证Azure开发工程师(AZ-204)考试指南

by Adora Nwodo
August 2025
Beginner to intermediate
360 pages
5h
Chinese
O'Reilly Media, Inc.
Content preview from 微软认证Azure开发工程师(AZ-204)考试指南

第 10 章 Azure 上的监控和可观察性

本作品已使用人工智能进行翻译。欢迎您提供反馈和意见:translation-feedback@oreilly.com

构建 应用程序并将其部署到 Azure 之后,工作并没有就此停止。您要不断确保应用程序可靠、可用,并为用户提供良好的性能。监控和可观察性对于密切关注应用程序的健康状况、及早发现问题并了解系统行为方式至关重要。如果没有适当的监控,您可能会错过一些重要问题,如性能缓慢甚至影响用户的中断。

在本章中,我们将介绍帮助你有效监控和管理应用程序的主要 Azure 服务。我们将从 Azure Monitor 开始,,它为收集和分析来自应用程序和资源的数据提供了一个统一的平台。您将了解 Azure Application Insights ,该工具可帮助您跟踪应用程序的执行情况、查找错误并深入了解用户活动。

我们还将了解 Azure 日志分析,,它可以让你收集和搜索来自不同来源的日志数据,使用强大的查询功能找到模式并解决问题。我们将探索 Azure 数据资源管理器,它非常适合实时分析大量数据,使其在跟踪系统性能和诊断问题时非常有用。

此外,我们还将介绍 Azure 服务健康状况和 Azure 资源健康状况, ,它们可为您提供有关 Azure 服务和资源健康状况的信息,帮助您提前预防潜在问题。我们将讨论 Azure Automation 如何帮助您设置自动操作和警报,以便在需要您关注时随时通知您。

我们还将讨论可帮助你监控和排除网络问题的 Azure Network Watcher(),以及可让你跟踪云支出并设置预算以避免意外费用的 Azure 成本管理和计费( )。最后,我们将分享构建强大监控策略、选择正确工具以及持续改进 Azure 可观察性方法的最佳实践。

在本章结束时,您将清楚地了解如何为 Azure 应用程序设置有效的监控和可观察性,确保它们顺利运行,满足用户需求,并随时准备应对任何挑战。

监控和可观察性概述

想象一下 Instagram 在圣诞节当天宕机,让您无法发布最喜欢的家庭睡衣照片。很沮丧吧?这就是监控和可观察性的重要性所在。它们就像任何应用程序的眼睛和耳朵,尤其是在像 Azure 这样的云环境中。

监控就是从应用程序和基础架构中收集数据,跟踪运行情况。这包括跟踪性能指标、检查错误和观察资源使用情况。当服务器宕机或应用程序开始运行缓慢等问题出现时,监控工具会向您发出警报,这样您就可以在问题影响用户之前将其解决。

可观察性更进一步。它不仅要看到问题所在,还要了解问题发生的原因。它包括收集和分析系统中的详细数据,如日志、指标和跟踪,以全面了解应用程序的行为。这可以帮助您更快地找到问题的根本原因,甚至在潜在问题发生之前进行预测。

在 Cloud 环境中,监控非常重要,因为您的应用程序在共享资源上运行,而这些资源可能会动态变化。服务器可能会扩大或缩小、移动,甚至暂时离线。如果没有监控,您可能不知道您的应用程序何时会因资源限制、意外流量高峰或其他问题而陷入困境。

监控可帮助您保持 Cloud 应用程序的可靠性和可用性。通过它,您可以检测性能瓶颈、管理资源成本,并确保应用程序满足用户期望。通过适当的监控,您可以设置自动警报,甚至自动操作,如在流量增加时扩展额外的服务器,以保持无缝运行。

在监控和可观察性方面,了解指标、日志、跟踪、警报和仪表板非常重要:

指标
指标是跟踪系统性能和健康状况的测量值。例如,CPU 使用率、内存消耗、响应时间和请求率都属于度量指标。指标通常是可以实时收集的数字数据,可帮助您快速发现趋势或异常行为。 ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

What Successful Brick-and-Mortar Retailers Get Right

What Successful Brick-and-Mortar Retailers Get Right

Rob Angell
A Five-Step Guide to Improving Your Employer Brand

A Five-Step Guide to Improving Your Employer Brand

Kimberly A. Whitler, Richard Mosley
What Successful Project Managers Do

What Successful Project Managers Do

W. Scott Cameron, Jeffrey S. Russell, Edward J. Hoffman, Alexander Laufer

Publisher Resources

ISBN: 9798341666177