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 可观测性工程
52
|
5
务交互时发生的所有信息的记录。
为了记录事件,需要在请求触达服务时首先初始化
Map
数据。在请求的生命周期内,发
生的所有细节
包括特定的
ID
、变量、请求头、请求传递的参数、执行时间、远程服
务的任何调用、远程调用的执行时间甚至是上下文等所有对后期调试有价值的信息
都会被添加到
Map
数据中。等请求即将结束或者出错时,捕获
Map
数据就能得到所发
生情况的详尽记录。
Map
中记录的所有信息是有组织和有类型的键值对,所以很容易搜
索。换言之,这些数据应该是结构化的。这就是结构化事件。
调试服务问题需要将结构化事件相互对比以发现异常。当某些事件与其他相比表现异常
时,很容易辨别出这些异常值的共同之处。探索这些异常值,需要根据可能与你的调查
相关的事件中包含的不同维度和维度组合来进行过滤和分组。
作为结构化事件输入可观测性系统的数据需要捕获正确的抽象级别,以帮助观测者确定
应用程序的状态,无论其多么异常或新奇。对调查人员有用的信息,可能包含不特定于
任何给定请求的运行时信息(例如容器信息或版本信息),也包括服务接收的请求信息
(比如购物车
ID
、用户
ID
或者会话令牌),这两种类型的信息对于调试都非常有帮助。
与调试请求相关的数据种类会有所不同,但在使用传统调试器时,通过比较有用的数据
类型来考虑这一点是有帮助的。举例来说,调试人员想要了解请求执行时的一些变量的
值,或者想要了解某个函数调用的场景(时间)。在分布式服务中,这些函数调用产生时
可能有很多远程服务的调用发生。在这种场景下,请求执行时携带的变量的参数就可以 ...
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