Skip to Content
可观测性工程
book

可观测性工程

by Charity Majors, Liz Fong-Jones, George Miranda
July 2023
Beginner to intermediate
270 pages
4h 48m
Chinese
China Machine Press
Content preview from 可观测性工程
可观测性驱动开发
|
105
时间会增加好几个数量级。
乍一看,可观测性和编写高质量的软件之间的联系可能并不是那么相关。但正是这种可
以快速调试的需求,把可观测性和高质量的软件紧密结合在了一起。
11.3 从哪里开始调试
初次接触可观测性的人经常会犯一个错误,认为可观测性是代码调试的一种方式,类似
于在代码中打印各种详细的日志。虽然可以使用可观测性工具调试代码,但这并不是可
观测性工具的主要目的。可观测性是排查系统之间的问题,观测系统的运行,而不是用
来观察函数的运行。在日志中打印更多的细节可以更好地调试代码,但也会产生更多的
日志输出,以至于浪费更多的存储,并且淹没其他更重要的可观测性的信息。为调试代
码而花费更多的成本是不切实际的,因为调试的成本可能是业务系统的
1
10
倍。
可观测性不是用来调试代码逻辑的。它是为了找出系统中需要调试的代码所处的位置。
可观测性工具通过快速缩小可能的问题范围来帮助你快速定位故障。故障出自哪个组
件?在哪里发现了延迟?哪些数据处理得比较慢?哪一次调用处理的时间最长?用户等
待时间是平均分布在所有用户身上,还是只存在于一部分用户那里?可观测性有助于你
查找问题的可能根源,而绝非确认哪行代码出现了问题。
通常,可观测性还可以让你更好地了解受影响组件内部或者周边可能发生的情况,提示
错误可能是什么,甚至提供错误发生位置的提示:在代码、公共组件库或者更高级别的
结构对象中。
一旦你确定了错误产生的位置以及关于它如何产生的一些特征,可观测性的工作就完成
了。下面,如果你想更深入地研究代码本身,那么你需要一个传统的调试器( ...
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

可观察性工程

可观察性工程

Charity Majors, Liz Fong-Jones, George Miranda
What Successful Project Managers Do

What Successful Project Managers Do

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

Publisher Resources

ISBN: 9787111729099