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 可观测性工程
可观测性驱动开发
|
107
上述因素的某种组合。
如果没有可观测性,你可能会看到所有性能图表同时出现峰值或下降。
11.5 探针如何提高可观测性
可观测性有助于准确定位问题的根源,发现常见或者大规模的异常情况。可观测性也可
用于快速识别问题,例如,特定的构建
ID
、一组主机、一类实例、容器版本、内核补丁
版本、数据库或其他任何细节上的问题,用可观测性发现是一个非常理想的选择。
然而,可观测性的一个更重要的组成就是创造了更加有用的探针。良好的探针推动可观
测性。探针的一种最佳实践,是在合并别人的代码时就开始考虑。在没有考虑清楚“我
怎么知道这个更改是否按照预期工作?”这个问题之前,永远不要提交或者接受合并相
关代码的请求。
开发探针时,一个比较重要的目标是创造有效机制和更短的反馈闭环。换句话说,可以
让发布代码和修复错误之间产生必要的联系,这就是传说中的“让工程师值班”
实现这种循环的一种方式是,将告警自动发给刚合并代码并且要上线的工程师。在一段
时间内(可能是
30
分钟到
1
小时),如果生产环境中出现了告警,告警就会发送给提交
代码且刚上线的工程师。当工程师在生产环境中体验到他们自己代码的质量时,他们检
查代码并且更快地隔离或者解决问题的能力(动机)就会自然而然地增加。
这种机制并不是惩罚。相反,它对加强代码的“主人翁”意识有着非常大的作用。如果
工程师不能及时收到线上的问题和反馈,就不能开发出满足生产环境质量要求的代码和
工程实践。每个工程师都应该对自己的代码负责,以便他们可以在代码部署后立即回答
以下问题:
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