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 可观测性工程
56
|
5
"path":"/super/slow/server",
"port":80,
"service_name":"slowsvc",
"status":200,
"time":"2019-08-22T11:57:03-07:00",
"trace.trace_id":"eafdf3123",
"user":"foo"
}
可观测性的目标是让使用者能够以任意方式查询事件数据,从而了解系统的内部状态。
为了实现这一目标,其所需要的数据一定是机器能解析的。非结构化数据根本无法实现
这个目标。但是,日志数据仿照结构化事件重新设计后就能成为可观测性的构建块。
5.4 在调试中有用的事件属性
本章前面将结构化事件定义为一个特定请求与服务交互时发生的所有事件的记录。在调
试现代分布式系统时,这大约是一个工作单元的正确范围。为了创建一个系统,使观测
者能够理解系统的任何状态,那么无论事件多么新颖或复杂,都必须包含可能与调查相
关的充足信息。
在可观测系统中,后端数据存储必须允许事件任意宽。使用结构化事件了解服务的行
为,需要记住模型初始化时是空
blob
,记录了可能与后期调试相关的所有信息,就是说
在请求到达服务时预先在
blob
输入已知数据:请求参数、环境信息、运行时信息、主机
/
容器统计数据等。执行请求时也需要注意其他有用信息:用户
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