读见

本体驱动的可观测性:在 Netflix 规模下构建端到端知识图谱

原题Ontology‐Driven Observability: Building the E2E Knowledge Graph at Netflix Scale

约 26 分钟约 6,424 字原文英文已翻译

推荐理由InfoQ 刊发 Netflix 工程师 Prasanna 与 Renzo 的演讲:在每日数十亿请求、每秒数千万日志规模下,用操作本体+LLM 采集管道把故障写成可 SPARQL 查询的知识图谱。适合大规模可观测性/AIOps 工程师对照。

读前速览

4 个要点

Netflix 工程师详细介绍了他们如何通过构建由操作本体驱动的端到端知识图谱,将可观测性从反应式监控转变为主动式洞察引擎,该图谱结合了确定性富集器、LLM 和采集管道,以应对复杂的运维挑战。

  1. 极大规模下的可观测性挑战

    在 Netflix 的规模下(跨数千个微服务处理多达 6,500 万并发流、每天超过 20 亿次请求、每秒 3,800 万个实时日志事件),传统的反应式监控会导致数据孤岛、缺乏上下文的告警以及多团队调试瓶颈。

  2. 向端到端互联的转变

    Netflix 的愿景是通过建立显式关系而非单纯的连接,将指标、事件、日志和追踪(MELT 层)统一起来,从而将反应式监控转变为主动式洞察引擎,确保所有可观测性工具使用统一的语言。

  3. 操作本体与知识三元组

    为了编码语义,Netflix 利用 W3C 标准(RDF、OWL、SPARQL、SHACL)来构建操作本体。知识被结构化为基本三元组(主语、谓语、宾语),形式化地描述服务、基础设施和团队所有权。

  4. 采集管道与知识飞轮

    系统摄取混乱的 Slack 故障线程和遥测数据,通过确定性富集器(正则、API 验证、服务目录检查)和 LLM 进行处理以提取实体、情感和因果链,将非确定性转化为 QuipuDB 中结构化的、可通过 SPARQL 查询的图数据。

完整摘要

来自 Netflix 的工程师 Prasanna Vijayanathan 和 Renzo Sanchez-Silva 在演讲中探讨了在极大规模下进行可观测性的核心挑战,需应对每日数十亿次请求以及每秒数千万个实时日志事件。演讲者指出,在此规模下,可观测性已不再是工具问题,而是一个被数据孤岛(指标、事件、日志、追踪)和碎片化告警所复杂化的数据工程挑战。为弥合这些鸿沟,Netflix 正在构建一个由操作本体驱动的端到端知识图谱。通过结合确定性提取器(正则、API、服务目录)与随机性 LLM 分类的采集管道,他们将混乱的 Slack 故障讨论和遥测数据转化为存储在 QuipuDB 中的机器可读 W3C 标准三元组。这种知识飞轮方法能够进行观测、富集、推断和自适应,将非确定性的运维故障转化为确定性的、可通过 SPARQL 查询的因果链,从而实现快速根本原因分析和自动化修复。

目录 · 8 节

查看原文

文字稿Transcript

Prasanna Vijayanathan:我叫 Prasanna Vijayanathan,是 Netflix 可观测性团队的一员。我负责我们所有会员应用的可观测性、性能和体验质量。也就是说,从你点击 Netflix 标志到开始观看内容,这期间你在 Netflix 上的体验如何,都是我的工作内容。我们应该关注哪些指标?应该使用哪些工具?应该为用户提供哪些洞见,才能确保我们了解大家喜欢什么?如果你喜欢看 Netflix,那欢迎你继续看。如果不喜欢,那你可以怪我的同事 Renzo。Prasanna Vijayanathan: My name is Prasanna Vijayanathan. I'm part of the observability team at Netflix. I work on observability, performance, and quality of experience across all our member applications. What that means is from the point you click on the Netflix logo until you start watching something, how does your experience feel on Netflix is what I look into. What metrics should we look at? What tools should we have? What insights should we provide to our users to make sure that we understand what you all like? If you do like watching Netflix, you're welcome. If you don't, you can blame it on my colleague, Renzo.

Renzo Sanchez-Silva:我是 Renzo Sanchez-Silva。我在 Netflix 工作将近 10 年了,一直在可观测性部门的监控与告警团队,参与搭建了多个告警基础设施,如今也开始涉足 AIOps 领域。我以前还做过一些本体论研究。随着 AI 的发展,一切都在逐渐融合。Renzo Sanchez-Silva: I'm Renzo Sanchez-Silva. I've been at Netflix for almost 10 years now with the monitoring and alerting team within observability, building several alerting infrastructure, and now getting into AIOps space. I've done also some research back in the day in ontology. With AI, everything is converging.

大规模可观测性——为什么如此困难?Observability at Scale - Why is it Hard?

Prasanna Vijayanathan:今天我们要和大家谈谈一个我们一直在解决的问题。乍看之下,它像是一个可观测性方面的挑战,但实际上是一个棘手的数据工程问题。在深入讨论之前,先让我介绍一下背景。为什么在大规模场景下,可观测性这么难?我们说的规模究竟有多大?来做个突击小测吧。Netflix 推出了直播活动。2024 年底,我们举办了首批大型直播活动之一——杰克·保罗对阵迈克·泰森的拳击赛。你们当中可能有人看过。你们觉得那场活动的峰值流量有多大?肯定是数百万级。是 6500 万路并发流。也就是说,有 6500 万用户同时点击播放并观看直播。这就是我们的峰值流量。再来一个问题。当你登录 Netflix 时,应用会向我们的基础设施发送请求,由后端进行响应,诸如此类。Prasanna Vijayanathan: Today we're going to talk to you about a problem that we've been tackling, which at the surface feels like an observability challenge, but it's really a hard data engineering problem. Before I get into that, let me set the stage up. Why is observability hard at scale? What scale are we even talking about? Let's do a pop-up quiz. Netflix launched live events. End of 2024 was one of our first major big live events, a boxing match between Jake Paul and Mike Tyson. A few of you might have watched it. What do you think was our peak traffic during that event? It's definitely in the millions. It's 65 million concurrent streams. What that means is there are 65 million users clicking watch and watching the stream at the same time. That was our peak traffic. One more. When you log into Netflix, the apps are sending requests into our infrastructure for our backends to respond and stuff.

你觉得我们的应用每天会向服务器发送多少个请求?我们每天要处理超过 20 亿个请求。最后一个问题。面对这么多请求,我们显然有自己的可观测性系统,用来记录指标和各种其他信息。你觉得我们每秒需要处理多少条实时日志事件?每秒高达 3800 万条。这就是我们所说的规模。全球各地的电视、手机、笔记本电脑等设备和客户端平台数量众多。数千个微服务不断产生数十亿条遥测事件。每位用户的每一个操作都会触及我们基础设施的诸多不同部分,包括内容分发网络、节点等。除此之外,我们的整个生态系统中还通过 A/B 测试运行着数千项实验。要大规模管理这一切。万事万物,同时并行。How many requests do you think we handle per day coming from our applications to our servers? We handle more than 2 billion requests a day. Last one. With all those requests happening, we obviously have our own observability systems where we log metrics, a lot of different things. How many real-time logging events do you think we have to handle per second? It's upward of 38 million events per second. That is the scale we're talking about. Numerous client platforms and devices across all the TVs all over the world, mobile phones, laptops, you name it. Thousands of microservices emitting all these billions of telemetry events. Every single member touches so many different parts of our infrastructure, our CDNs, nodes, and so on. On top of all that, we have thousands of experiments running through A/B tests throughout our ecosystem. Managing all of that at scale. It's everything, everywhere, all at once.

端到端可观测性——它是什么?End-to-End Observability - What is It?

即便达到这样的规模,Netflix 的目标仍然是每时每刻都为每位用户提供尽可能出色的体验。我们对可观测性的策略很简单:我们是否拥有合适的工具、指标和洞察,来帮助我们实现这一目标?策略很简单,但执行起来并不容易。在这样的规模下,将用户体验与系统性能关联起来,是一种本质上截然不同的挑战。这已经不再是工具方面的挑战,而是数据工程方面的挑战。传统上,可观测性系统是监控和告警工具,用来观察应用和服务。一旦出现问题,系统就会发出警报。接着,你会查看问题情况,将其分派给合适的团队,必要时寻找合适的开发人员来修复,发布修复方案,然后确认数据是否恢复到预期状态。传统的可观测性系统就是这样运作的。借助端到端可观测性,我们希望重新思考可观测性的实现方式,将其从被动的监控体验转变为主动的洞察引擎。Even at that scale, our goal at Netflix is to deliver the best possible experience to every user every single time. Our strategy towards observability is simple. Do we have the right tools, metrics, and insights to enable us to do that? The strategy is simple. It is not easy. At this scale, correlating user experience with system performance is a fundamentally different challenge. It is not a tooling challenge anymore. It is a data engineering challenge. Traditionally, observability systems have been monitoring and alerting tools where you observe your apps and services. Something goes wrong, you get flagged. Then you look at what's going on, triage it to the right teams, look for the right developers to fix it if needed, roll out a fix, and then see if the data comes back to where it is expected to be. That's how traditionally observability systems have worked. With end-to-end observability, we wanted to rethink how we do observability, and change it from a reactive monitoring experience to a proactive insights engine.

在向你展示我们是如何做到这一点之前,我想先谈谈我们描绘的愿景。想象这样一个系统:它能在几分钟内自动检测整个技术栈中的问题。这不只是某一个服务或应用,而是覆盖整个技术栈。无论问题发生在哪里,你都能知道正在发生什么。接下来,系统会根据问题对用户造成的影响,自动确定优先级。它还能自动将问题分派给合适的团队。你不必盯着某个应用和某个错误,然后说:“我想沿着这条线索,在大海捞针般的复杂环境中追查下去,找出相关的服务并把它们都拉进来。”再进一步,我们能不能自动找出根本原因?不只是分派问题,而是真正识别出问题的根因?或者更好的是,能不能在问题真正开始影响用户之前就预测到它,甚至开始提出或采取纠正措施?Before I show you how we do that, I want to talk about the vision that we created. Imagine a system that can detect issues automatically in a few minutes across the entire stack. It's not just one service or app, but across your stack. Wherever an issue happens, you know that this is what is happening. Then you go into automatically prioritizing those issues based on how it's impacting our users. You also can triage it to the right team automatically. You don't have to look at one app and one error and say, I think I'm going to follow this needle through this haystack and pick out different services and loop them in. Then, can we automatically root cause? Not just triage, but can we actually identify the root cause of the issue? Or, even better, can we predict issues even before they would actually start impacting our users and maybe even start suggesting or taking corrective actions?

这可能实现吗?我们想做成这样。构建这个系统,就能让我们从用户的设备出发,穿过我们的网络和网关服务,深入后端依赖和服务的最深处,实现无缝可视。所有环节彼此连接,并且实时运行。用户在 Netflix 上的体验不会受到任何干扰。每次观看 Netflix,你都会乐在其中。每一次,你的体验都会无比精彩。这就是我们的愿景。Is this possible? We wanted to do this. Building the system would give us seamless visibility from the user's device through our networks into our gateway services into the deep trenches of our backend dependencies, services. All connected, all in real time. Users would have no disruptions to their experience on Netflix. Every time you watch Netflix, you will love it. Your experience is going to be awesome, every single time. This is our vision.

听起来不错,但这与现实相去甚远。如今的情况大不相同。我来带你回顾一下最近一次调查的时间线,大概是过去一年左右发生的事。我们某个客户端平台在大约 3:30 触发了一条告警。通常,值班人员会看一眼,然后想:“我先等等看,看看这种情况会不会持续下去。也许会有什么神奇的事情发生,它自己就消失了。”有时确实会,有时则不会。几个小时后,他们才会认真查看:“我觉得这是真正的问题。我得去查清楚,顺着这条线索看看是不是还有其他服务受到了影响。”一般来说,确实会有其他服务受到影响。然后,问题会被分派给合适的团队。结果发现,那个团队从当天大约 1:30 起就已经在排查这个问题了,大家早就在处理了。Sounds great. That's far from reality. It's very different today. I'll walk you through a timeline of a recent investigation, probably within the last year or so. There was an alert that got triggered on one of our client platforms, I'd say around 3:30. Typically, on-calls look at it and they're like, let me wait for a while. Let me see if this is going to sustain. Maybe something happens magically and it'll go away on its own. Sometimes it does. Sometimes it doesn't. A couple of hours later, they're actually looking at it, "I think it's a real issue. I need to go figure out, follow this needle and see if there's another service that's impacting." In the average case, usually it does. Then it's triaged to the right team. Then it turns out that team was already debugging this issue from like 1:30 that day. People are already on it.

现在有多个团队参与进来。这些团队之间开展了更多调试工作。调试开始后,他们会追查根本原因,顺着线索找到真正导致问题的服务。在这个案例中,结果发现有个服务认为自己没那么重要,于是削减了自身容量。这导致了反向传播错误。此时大约是 6:30,也就是客户端应用实际发现用户受到影响后的三个小时。我们推出了修复方案,并在一小时内解决了问题。这算是一个平均案例。听起来还不算太糟,大概四个小时,不算太糟。 但再想想这期间发生了什么:有九个团队收到告警,三十多名工程师以不同方式参与了整个调试过程。此外,还有另外三起相关事件也被标记出来。各个团队都陷入了恐慌。这种情况很常见,而且这还算是一个平均案例,甚至称不上糟糕的例子。 把这四个小时以及投入的所有资源加起来,只会让人觉得这是在浪费。端到端可观测性正是要解决这个问题。Then, multiple teams are involved now. There's a lot more debugging happening between all these different teams. Then once the debugging starts, they root cause the actual issue, follow the needle down to the actual offending service. In this case, it turned out there was some service that thought they're not as important and cut down their capacities. That caused backward propagation errors. That's around like 6:30, three hours since the client application actually noticed real user impact. We rolled out a fix. It was resolved within the hour. This is an average case. It doesn't sound too bad. It's like four hours. Not too bad. Then when you consider what it took, during this time, there are nine teams that were paged. More than 30 engineers were involved in the entire debugging process in different capacities. Then three other related incidents that were also flagged. There's panic everywhere across teams. This is typically, and this is an average case. This is not even a bad example. Then when you put together the four hours and all the resources that get involved, it just feels wasteful. This is what you want to solve with end-to-end observability.

我们研究了原因。为什么会发生这种情况?我们归纳出了四个主要方面。第一,数据源过于分散。日志、指标、事件和追踪数据大致分别以不同形式存储在不同的数据存储中。它们各自为政,彼此之间无法沟通,也没有统一标准,结构也各不相同,诸如此类。这会导致告警彼此割裂、缺乏上下文:每个团队都会选择适合自己、在各自孤岛中运行良好的数据源,然后据此设置告警。告警触发时,不同团队其实是在看同一个问题,却各自从不同角度来理解。它们本该彼此沟通,但实际并没有发生。结果就是,团队在对问题进行分类和实际排查时会变得更加复杂。归根结底,我们实际上无法发现用户受到的影响。如果你是一个距离用户有 5 跳、10 跳之远的下游服务,那么你几乎永远无法弄清自己的系统和服务是如何影响最终用户的。We looked at why. Why does this happen? We came up with four main themes that existed. One, you've got too many siloed data sources. We got roughly logs, metrics, events, and traces that are stored in different forms in different datastores. They are in silos. They don't talk to each other. They're not standardized. Structures are different, and so on. That leads to disconnected and non-contextual alerting, which means each team follows a data source that works well for them in their silo and then set up alerts. Then when alerts trigger, they are looking at the same problem in one way compared to another team that's looking at the same problem from a different perspective. They should be talking to each other, but that doesn't happen. What that leads to is complexity in how teams triage and actually troubleshoot the issue. Ultimately, what that means is we actually don't detect what is the impact for our users. If you're a downstream service, 5 hops, 10 hops away from the user, you almost never understand how your system and service is affecting the end user.

互联互通——弥合差距,打破孤岛Connectedness - Bridging Gaps, Breaking Silos

基于我们所看到并秉持的端到端可观测性愿景,我们该如何解决这个问题,从现实状态迈向愿景?用一个词来回答,就是互联互通。这正是我们的想法。共同主题就是互联互通。我们希望数据、告警、调试系统、工作流和根因分析都能彼此连接。如果我们围绕端到端可观测性建立这一主题,就不需要让 10 个不同的数据源催生出 6 种不同的工具。我们希望构建一个集成式可观测性层,用一个抽象层就能全面呈现系统的可观测性。这意味着,我们的仪表盘、告警、调试工作流和事件响应工具都使用同一种语言。这样一来,在系统中针对相同问题和相同症状重复调试与分流处理的情况就会减少,你也就能沿着线索一路追踪,从用户设备一路追溯到真正的根因。Given the vision that we saw, that we have for end-to-end observability, how do we solve this and move from the state of reality to the vision? The one-word answer for that is connectedness. That's what we thought. The common theme is that. We want connected data, connected alerting, connected debugging systems, workflows, and root cause analysis. If we create that theme for end-to-end observability, we don't need 10 different data sources giving rise to 6 different tools. We want to create an integrated observability layer. One abstraction that can tell you everything about our system's observability. What that means, then, is our dashboards, alerts, debugging workflows, and incident response tools, they all speak the same language. Then duplicating efforts in debugging and triaging, the same issues, and the same symptoms across the system is reduced, which means you can follow a breadcrumb trail, and then get into the same path from the user's device to the actual root cause.

你可以沿着不同路径上的线索追查,但最终要回到找出问题根因的主线上。这有助于缩短问题解决时间,最终提高诊断的准确性,让用户受到更少干扰,获得更好的体验。这一切的核心始于数据——相互关联的数据。用户、设备和应用,以及服务和基础设施,都会产生大致可分为四类的数据:指标、事件、日志和跟踪。我们将它们统一起来,放入同一个层,即 MELT 层。将所有这些数据源统一起来后,我们就能解决问题。重要的是,即使这些数据都汇集在一起,我们也必须确保它们准确且可用于采取行动。You can follow the breadcrumb from different trails, but get on the same main path of root causing the issue. That leads to reducing the time it takes to resolve issues and ultimately will improve the accuracy in diagnostics, and give our users a less disrupted and better experience. The core piece of all this starts with the data, connected data. We got our users, our devices and applications, and our services and infrastructure, all emitting these broadly four different categories of data: metrics, events, logs, and traces. We unify them and put them in one layer, the MELT layer. Once we unify all these sources, we solve the problem. It's important that even if all of this exists together, we need them to be accurate and actionable.

让我再带你了解另一种场景。假设我们已经有了这一层。再假设我们发现了一个回归问题:LOLOMO TTR。LOLOMO 是你在 Netflix 上看到的电影列表的列表的指标。TTR 则是这个电影列表的列表的某种渲染时间。你发现这里出现了回归。有一个缓慢的泄漏,而且还有一个严重的回归。开发人员注意到了这一点,于是询问我们的统一数据层:发生了什么?现在所有可观测性数据都集中在一个层里,所以告诉我发生了什么。然后,指标系统会告诉你:是的,我发现 LOLOMO TTR 出现了回归。我还发现,另外 12 个指标在 5 个不同的服务中同时出现了相关变化,它们也都在回归。我们找到了一些相关性,这很好。接着,事件数据会告诉你,在这次回归开始之前,各个应用和服务中还发生了 47 个事件。是的,我可以在图表上看到这一点。Let me walk you through another scenario. Let's say we have this layer already. Let's say there is a regression we see, LOLOMO TTR. LOLOMO is the metrics of the list-of-list-of-movies that you see on Netflix. TTR, some rendering time for that list-of-list-of-movies. You see a regression there. There's a slow leak, and there's a big regression. Developer notices this and they ask our unified data layer, what happened? Now all the observability data lives in one layer, so tell me what happened. Then the metrics system would tell you, yes, I see LOLOMO TTR regressing. I also see 12 other metrics across 5 different services correlating, happening at the same time. They are also regressing. We find some correlations. That's good. Then events could tell you there are 47 events across all these different apps and services that also happened right before this regression started. Yes, I can see it on a graph.

我可以看到所有这些事件以及指标。然后日志告诉我,我觉得其中一个服务在这个时间点突然出现了连接池耗尽错误。也许问题就在这里。同时,其他所有这些服务也都在同一时间出现了超时错误。接着,链路追踪又能告诉你另一番情况。如果要讲我们在链路追踪方面做的工作,那得单独安排一场分享。简单来说,链路追踪会展示某个特定请求和响应从用户到所有处理过它的服务所经过的路径。你可以追踪这条路径。链路追踪的难点在于,除非你确切知道要找哪条链路,否则很难用它准确地排查问题。这甚至不是大海捞针,而像是在黑暗中蒙着眼睛,试图在森林里找一片树叶。太难了。I can see all these events along with the metrics. Then logs tells me, I think there is a connection pool exhaustion error that spiked up at this time in one of those 7 services. Maybe that's what it is. There are also all these timeout errors in all these other services at the same time too. Then traces can tell you a different story. If I'm going to talk about the work we've done with traces, that will be a different session on its own. To give you an idea, a trace gives you a path for a particular request and response from the user to all the services that touched it. You can trace that path. The challenge with tracing is, unless you know exactly what trace you're looking for, it is super hard to use it to debug an issue accurately. It's not even a needle in a haystack. It's like looking for a leaf in a forest in the dark and you're blindfolded. It's hard.

本体论——关系,而不只是连接Ontology - Relationships, Not Just Connections

我们真正缺少的,不只是连通性,还有拼图中这些不同部分之间的关系。我们需要了解这些组件之间的连接,没错,但我们还想知道它们如何相互作用、彼此之间有何关联。我们称之为可观测性本体。Renzo 将带你了解我们如何构建这些关系,以及我们如何在日常工作中运用它。What we are really missing is not just connectedness, but the relationships between all these different pieces of this puzzle. We need to know the connections from these components, yes, but we also want to know how they interact with each other and how they are related to each other. This we call the observability ontology. Renzo will walk you through how we build these relationships and how we're putting this to use every day.

Renzo Sanchez-Silva:什么是本体?它只是一种对类型、属性和关系进行正式规范的方式,也是我们编码意义的方式。它的基本构成就是所谓的三元组。三元组由主语、谓语和宾语组成,每个三元组表达一条事实。例如,一个人是员工;某项服务很重要,或者属于 0 级服务。三元组也可以表达属性。这就是我们编码知识的方式。其实,它非常基础,甚至可以说是最原始的形式。就像说“泰山爱简”。“妈妈爱爸爸。”婴儿脑海里也有微型本体。我们只是开始在脑中收集这些符号化的三元组,继而开始提出命题、进行推理,等等。本体是一种编码知识的方式。我们使用 W3C 标准,包括 RDF、OWL(Web 本体语言)、SPARQL(查询语言),以及 SHACL(形状约束语言)。借助它,我们可以规定某项服务可以在 AWS 中终止;但还有另一条约束:如果该服务的容量多于或少于 10%,就不能终止。Renzo Sanchez-Silva: What is an ontology? It's just a formal specification of types, properties, and relationships. It's how we encode meaning. The basic construct of it is what you call the triple. The triple is a subject, a predicate, and an object, one fact per triple. It can be, a person is an employee. A service is important, or tier-0, for example. It can be properties too. This is the way we encode knowledge. It's very basic, very primordial, actually. It's like saying Tarzan loves Jane. Mommy loves Daddy. Babies have mini ontologies in their head. We just start collecting all these symbolic triples in our heads, and we start making propositions and reasoning and so forth. Ontologies are a way to encode knowledge. We're using W3C standards, RDF, OWL, web ontology language, SPARQL, the query language, SHACL is shapes constraint language, where we can say a service can be terminated in AWS, but then another constraint is if the service has more or less than 10% of capacity, you cannot terminate.

你可以对所有这些内容进行编码。你可以描述你的服务、整个基础设施。比如,我们有 API 网关,它属于应用类型,由一个团队负责,部署在某个区域,等等。我们可以描述基础设施中的每一个组成部分,而且每个部分也都有自己的命名空间。我们最初是通过描述事故来构建这个初级本体的。我们已经确定了几个命名空间,正在构建一个运维本体。再回到 Prasanna 的愿景,我们的目标是开始找到这个端到端的可观测性图谱,展示基础设施中彼此关联的所有事物。我们把它称为运维本体。例如,我们可以确定这些命名空间,并在三元组中以正式方式引用它们。You can encode all these things. You can describe your services, the whole infrastructure. For example, we have API gateway. It's of type application. It's owned by a team. It is deployed in a region, and so forth. We can go and describe every single piece of the infrastructure, and every piece there is namespaced as well. We started building this baby ontology by describing incidents. We have identified a few namespaces. We're building an operational ontology. The goal, again, going back to Prasanna's vision, is to start finding this end-to-end observability graph of all the things connected in our infra. Let's call that the operational ontology. For instance, we identify these namespaces, and they can be referenced formally in the triples.

问题在于,如何理顺这种运营混乱:故障信息散落在 Slack、PagerDuty、MELT 层、指标、追踪、日志和事件中。我们都聚到同一个频道里,里面有数百条消息,涉及许多服务,人们也在相互交流。在找到根本原因之前,一切都乱成一团;而找到原因后,往往又要过好几个小时才能修复问题。我们想做的是观察这些情况,并开始实时地将其编码,捕捉其中的结构,以及如何用机器可读的类型来保存这些信息。一条消息显然可以是英文。接着有人说:“这次部署之后,API 网关的延迟飙升了。”诸如此类,然后 Jane 正在回滚。之后,你就可以用三元组来描述这些内容。这就是我们要做的事。手动完成这项工作很难。事实上,在过去还没有 AI 的时候,你需要一位本体专家一直负责标注:这是那个、这是一个人、这是一个服务,等等。The problem is how to bring order to this operational chaos, in incidents scattered across Slack, PagerDuty, the MELT layer, metrics, traces, logs, and events. We all gather in the channel together. There are hundreds of messages, many services, people interacting. It's crazy until we find root cause, and then we fix the issue many hours later. What we want to do is observe that, start encoding in real time. Capturing the structures and how we preserve this in machine-readable types. A message can be, obviously, in English. Then someone says, API gateway has latency spiked after this deployment and so forth, and then Jane is rolling back. Then you can describe that in triples. That's the idea of doing this. Doing this by hand is hard. In fact, back in the day when there was no AI, you needed to have an ontologist who was always annotating, this is that, this is a person, and this is a service, and so forth.

借助 AI,我们可以快得多地完成这件事。为此,我们创建了一套称为采集流水线的流程。事件发生在 Slack 中,那里才是真正开展工作的地方。对于每个频道,我们都会转换其中的每条消息,并将每条消息发送给一组增强器。我们会调用可观测性 API,还会使用 LLM 来进行额外的分类,并将结果关联起来。然后,我们把这些数据保存到图数据库中,我们称之为 QuipuDB。图中绿色的增强器具有很强的确定性。我们希望识别——例如,这是在 incident.io 上的事件,我们把它作为事件管理软件使用——它的 ID。比如,我们会提取触发的 PagerDuty 告警。我们还有各种非常确定的小型算法来分类信息,因为我们知道 URL 的结构,例如可以从中提取 ID。我们还会提取例如线程或消息中所表达的情绪倾向。With AI, we can do this much faster. For this, we created what we call a harvest pipeline. The incidents occur in Slack. That's where the action happens. For each channel, we transform every message, and we send every message to a bunch of enrichers. We call observability APIs. We use LLMs on top to find some extra classification, we correlate that. We save that in our graph database, we call it QuipuDB. The enrichers in green are very deterministic. We want to identify — for example, this is on incident.io, we use them as our incident management software — it's of this ID. We have the PagerDuty alert that was fired, for example, we extract that. We have various very deterministic, small algorithms that classify things because we know URLs, for example, we extract IDs. We extract, for example, also the sentiment of what is happening in the thread or the message.

蓝色部分显示的是告警和正在发生的时间线。人们会分享指向我们仪表板的链接,我们会对其进行编码,并知道这意味着什么。有人上传快照或屏幕截图时,我们会将其保存下来。这是一张与这张图表、这个指标相关的屏幕截图。 然后,在这个流程的最后,我们也会使用 LLM。此时我们已经识别出所有这些基本模式或实体,接着开始寻找新的关系、概念或定义。你可以看到,LLM 能发现一些很有用的信息,比如这里进行了金丝雀分析、部署失败之类的。它会根据目前收集到的内容开始发现概念。如果发现了新内容,我们就会尝试提出新的定义。这在本体论中称为开放世界假设:你可以在一定程度上自由地添加关系,而我们也有办法对其进行控制。整个流程受到严格管控,而且是顺序执行的。有时如果某个环节失败了,我们就先搁置它。比如,我们无法获取某些数据时,就会把它留在那里。然后,我们会将其与主要的元数据源进行核对。例如,软件目录中包含了所有服务的定义。我们会识别每项服务,了解它们的类型等信息。整个流程受到严格管控。In blue, we have alerts and the timeline that is occurring. People are sharing links to our dashboard. We encode that. We know what that means. Someone uploads a snapshot or a screenshot, we save that. It's a screenshot related to this graph, this metric. Then we use also LLMs at the end of this process where we have identified all these basic patterns or entities, and start finding new relationships or concepts, or new definitions. The LLM, you can see great things like this has canary analysis, deploy failed, and things like that. It starts finding concepts from what has been currently harvested. If it's new, we'll try to propose a new definition. This is what it's called in ontology, the open world assumption, where you are somewhat free to add relationships and we have ways to control that. It's a very controlled process. This is sequential. Sometimes if something fails, we just leave it. For example, we cannot grab some data, for example, you would leave it there. Then we check against our main metadata sources. For example, the software catalog is where we have the definition of all our services. We identify every service, and we know which type they are, and so forth. It's very controlled.

目标是从非确定性中创造确定性。非确定性首先源于渠道中的混乱,这只是一个例子。这是非确定性的第一个来源。然后,我们有一系列规则来提取数据。最后,锦上添花的是 LLM 的介入,它会说:“这里可能存在一种新的关系。这里有一个新的关联,诸如此类。”这里的悖论在于,我们使用随机性工具来生成可通过 SPARQL 查询的确定性图谱。本体就是这座桥梁,也是我们保存所有数据的地方。我们识别出了五个层级。这是一个引导启动过程。确定性提取指的是用绿色标出的那些步骤。例如,我们有一系列正则表达式,用来根据 ID 和服务器提取 Jenkins 作业。这是一种实体。这些都是广为人知的模式。接下来是目录验证,也就是编目,或检查该服务是否为部署在此区域的有效服务,等等。The goal is to create determinism from non-determinism. The non-determinism starts with the chaos in the channel, for example. That is the first source of non-determinism. Then we have a bunch of rules where we extract the data. Then, at the very end, the icing on the cake is the LLM coming and saying, this is probably a new relationship. There's a new connection here, and so forth. The paradox here is that we use stochastic tools to produce deterministic SPARQL queryable graph. The ontology is the bridge. It's where we save all the data. We identify five layers. This is a bootstrapping process. Deterministic extraction is those steps in green. We have a bunch of regexes, for example, that extract what a Jenkins job is by ID, by server. That's one entity. Those are very well-known patterns. Then the catalog validation is cataloging or checking against the service is a valid service deployed in this region and so forth.

我们通过自己的 API 和可观测性 API 丰富数据,然后将其交给 LLM 进行分类并发现新的谓词。我们还有最后一个步骤,称为概率关联:在整个对话中进行首次搜索。我们会找出这样的链条:事件始于应用程序 A,影响了应用程序 B;随后,原应用程序被回滚,问题也随之解决。这条链也会被识别为一个实体,也就是一种模式,并保存下来,以便将来我们或许能发现它与未来某个事件之间的相似之处。 此外,所有内容都有约束。我们有类别和一些分类体系,它们都受到约束。LLM 开始工作时,会尝试将内容归入某个类别,例如判断这段对话属于事件、问题、讨论还是决策。它只能从这四个值中选择。我们不会允许它凭空编造新内容,除非它告诉我们有这类情况;届时我们再看看该如何处理。所有内容都有类型,例如,thread 123 是相关的,true 则是布尔值。We enrich with our APIs, observability APIs, and then we pass the LLM to classify and find new predicates. We also have a final step, what we call the probabilistic correlation, where we do the first search in all the conversation. We find chains where the incident started with this one application that affected application B, the original application was rolled back, and then the issue was fixed. That chain is identified also as an entity, a pattern that will be saved so that in the future, maybe we will find similarities, this incident with something in the future. Also, everything is constrained. We have categories, some taxonomies, and they are all constrained. When the LLM comes in, it wants to classify some category, say whether this conversation is an incident, question, discussion, or decision. It can only choose from those four values. We don't let it hallucinate new things unless maybe it tells us that, and then we'll see how we can manage that. Everything is typed through, for example, thread 123 is related, true is a Boolean.

我们描述的是一个引导启动过程,也就是我们所说的知识飞轮。每转一圈,比如一个线程启动时,我们就开始识别实体。随着更多数据不断涌入,我们通过观察、丰富、推断和适配,沿着这个飞轮不断运转。我们观察 MELT 数据,利用各种丰富器对数据进行丰富,推断可能出现的新模式,或应用已有模式,并进行适配,以了解能够获取哪些知识。某个事件中的因果链,会成为下一个事件的已知模式。观察、丰富、推断,这就是主要流程。每次迭代,我们都会对知识进行编码。每个周期都会教会系统本体如何将这一模式演化并存入记忆。我们还有一个过程,将数据转化为信息,再将信息编码为知识。第四个阶段是智慧,也就是说,我们能够找出根本原因。我们今天可以对其进行编码,也可以在未来做到。The process we're describing is a bootstrapping process, what we call the knowledge flywheel, where every rotation, say a thread starts. We start identifying entities. More data comes in, we go around this flywheel by observing, enriching, inferring, and adapting. We observe the MELT data. We enrich with all these enrichers. We infer possibly new patterns or old patterns just to apply them, and we adapt to see what knowledge we can gather. The causal chain from one incident becomes a known pattern for the next. Observe, enrich, infer, that's the main process. In every iteration, we encode knowledge. Each cycle teaches the system, how the ontology will evolve this schema into memory. We have a process also where data is converting information, that information is encoded in knowledge. The fourth is wisdom, wisdom in the sense that we can find root cause. We can encode that today, but also in the future.

我们现在还不是在预测,只是在不断地描述。先描述。这就是婴儿会做的事。爸爸爱妈妈,他知道这是事实,但之后还会发生更多事情。一切都可以通过 SPARQL 查询。SPARQL 的语法很奇怪,但你会慢慢习惯。大语言模型很喜欢它。我们不在乎。有时候我甚至都不看它。再说一次,本体会逐渐积累那些反复发生之事的结构。模式会成为可查询的事实。We're not predicting here yet. We're just describing always. Describing first. That's what a baby does. Daddy loves mommy, he knows that is a fact, but then more things will happen later. Everything is queryable via SPARQL. SPARQL is a weird syntax, but you get used to it. LLMs love it. We don't care. I don't even read it sometimes. Again, the ontology accumulates the structure of what keeps happening. Patterns become queryable facts.

我们将 AI 用于这项工作并不奇怪。我们把 Claude 当作协同开发者。每当事件中出现新线程或新消息时,我们就运行这个采集器。它会创建一个 git worktree,因为我们不想和其他分支冲突——毕竟可能会同时发生很多事件,或者还会有新一轮迭代;之前的采集任务可能还在处理某些内容,尚未完成。它会创建一个 git worktree 或分支。然后我们也会用 Claude 来进行采集。我们运行的不只是一个脚本,而是让 Claude 配合采集脚本来提取数据,因为其中有一个 LLM 步骤,用来发现新的模式。同时,我们还会用它来找出这个脚本本身可能存在的 bug,让它能够修复自身。接着,假设整个循环结束了,我们最终只针对某一个事件的这一系列迭代就有了 15 个分支,然后由人工介入。It's not surprising that we use AI with this. We use Claude as our co-developer. When we get a new thread or a new message in an incident, we run this harvester. It creates a git worktree because we don't want to conflict with other branches, because there are many incidents happening, or maybe there's another iteration coming, the previous harvest can be working still on something and then it doesn't finish yet. It creates a git worktree or a branch. Then we use Claude also to harvest. We are not just running a script. We are running Claude with the harvesting script to extract the data because there's the LLM step that finds new patterns. At the same time, we use it to find maybe bugs in this very same script, so that it actually fixes itself. Then, say, that whole loop ends, and then we ended up with 15 branches only for this series of iterations, for one incident, and then human in the loop comes in.

我或者 Prasanna 都可以进来,说我们有这些分支,然后让 Claude 挑选提交,看看发生了什么。它会发现一些很有意思的东西,也会发现新的事实。比如,它会说这五个分支做的事情几乎一样,都发现了这个模式。另一个分支意识到自己运行在 Sonnet 4.5 上,于是决定把自己升级到 4.6,这挺酷的。它同时也在自我修复。你说,好,合并。然后继续推进。这是一个元循环。飞轮产出知识,第二个飞轮改进这套机制,目前还会用到我们。我们的想法是,最终让它不再依赖人类,由它自行合并。然后我们继续在其上迭代,叠加许多飞轮,有点像金字塔。直到它完全自主,然后我们再转向其他领域或命名空间。我们在 Slack 上是这样看待这件事的,因为 Slack 用起来很方便。Either me or Prasanna can come in and say, we got all these branches, and then we ask Claude to cherry pick and see what happened. It finds very interesting things. It finds new facts. Some, it says, these five branches did almost the same. They found this pattern. This other branch realized it was running on Sonnet 4.5, and it decided to upgrade itself to 4.6, which is cool. It's self-healing at the same time. You say, ok, merge. Then you keep going. It's a meta loop. The flywheel produces the knowledge, and the second one improves the machinery, and uses us for now. The idea is actually to make that non-dependent on humans and merge by itself. Then we continue iterating on top, so many flywheels on top, kind of a pyramid. Until it's completely autonomous, and then we move on to other domains or namespaces. This is how we see that in Slack, because Slack is convenient.

事情看起来是这样的。比如,在每次迭代中,我们会找到几个频道;而这次找到的恰好是一个平台运维频道、一个指标/分析工程频道。这些分类都是它之前发现过的。我从未告诉它这些频道是什么,但我接受了它的判断。我查看了一下并抽查了结果。这是一个告警管理频道,不是事件频道。这些都是通用频道。我们也在监控所有 Slack 频道。因为请记住,我们的想法不只是从一个小型本体开始,再逐步扩展到基础设施中更大的部分来描述它们。这只是针对通用频道的。这就是一次迭代结束时的情况。比如在这次运行中,它找到了一些 Turtle。Turtle 是我们用本体语言序列化 RDF 的方式。它发现正则表达式模式存在一些问题,而且 URI 未能正确保存为有效的 Turtle。This is how it looks. For example, at each iteration, we find a few channels, and then, this happened to be a platform operations channel, a metrics/analytics engineering, all these classifications are something that it has found before. I never told it what it was, but I accepted it. I looked and spot checked. This is an alert management channel. It's not incident channels. These are general channels. We're also watching all the Slack channels as well. Because, remember, the idea is not only start with a small ontology and then go up into bigger parts of the infrastructure to describe them. This is just for general channels. This is what happens at the end of one iteration. For example, in this run it found some Turtle. Turtle is the way we serialize RDF in ontology language. It found some issues with the regex patterns, and the URIs were not saving correctly to valid Turtle.

它发现了差异等等。接下来我可以继续说:“你可以合并这个”,然后它就会去合并。所有测试都通过了。合并已完成且成功。让我来做个总结。这意味着到了下一轮迭代时,这段代码已经在主分支中了。下一轮迭代里,有人会在频道中添加一条新消息,或者有新的发现。有人找到了一个根本原因,这实际上会触发这段新代码运行。接下来启动的 git worktree 将已经合并了这个修复。It found a diff and so forth. That's what I can continue and say, you can merge this, and it goes and does it. All tests passed. The merge is complete and successful. Let me create a summary. That means for the next iteration, this code is already in the main branch. The next iteration, someone is adding a new message in the channel or a new discovery. Someone found a root cause that will actually run this new code. The next git worktree that spins up, it will already merge this fix.

我提到的提取这些链路的部分,是我们关联引擎的一部分。它会找出所有这些链路。例如,某次提交采用了重试逻辑,并随这个版本一起部署。三分钟后出现了一个错误——连接超时,随后触发了警报,事件也随之启动。接着,LLM 会给出自己的置信度,但我们会保存这条链路。一次事件中可能出现很多条链路。想象一下,把所有这些链路汇总起来,未来我们就能积累大量数据,用于微调和相似性分析。实际上,智能体是熵的降低器。因为正如我所说,我们接收到的是嘈杂的输入。最终,我们会输出三元组,并建立新的关系;与此同时,我们也在寻找更好的数据提取方式,因为智能体循环正在进行。比如,我们会做 SME(领域专家)识别,判断某个人是否确实是领域专家,并找出其擅长的主题。The part that extracts these chains that I talked about, it's part of our correlation engine. It finds all these chains. For example, commit happened with retry logic. It was deployed with this version. Three minutes later there was an error, connection timeout, an alert fired, and the incident was started. Then the LLM comes up with its own confidence, but we save this chain. Many chains can happen in one incident. Imagine all these chains together, we'll have a lot of data in the future for fine-tuning and similarity. Agents are actually entropy reducers. Because, like I said, we receive noisy input. We spit out triples at the end, with new relationships, but at the same time, we find better ways of extracting data, because the agentic loop is happening. We do things, for example, like SME, Subject Matter Expert detection. This person is actually a Subject Matter Expert, and we find the topic too.

这些三元组不断累积,最终会告诉我们这个人是服务系统、Kafka 等方面的专家。我们也有以 Turtle 格式表示的服务拓扑,它们已经存在,因为我们从头开始,利用 eBPF、日志和跟踪数据等众多来源构建了它们。我们创建了这张图谱,涵盖了数千个服务依赖关系,展示了哪些服务彼此调用。这只是其中一部分。增强器的契约是这样的:我们有一个类,它是一个接口,你可以在其中看到数据增强部分,可以向图谱中添加三元组,等等。我们有很多这样的增强器,随着更多数据涌入,还会有更多增强器。Claude 实际上会告诉我们需要构建一个新的增强器,因为我们发现了某种新事物,而我无法从以往的历史记录中了解它,等等。它不在代码里,也不在本体里。我们需要创建它。实体中的每个 URI 都是稳定的。我们有域和 ID,可以始终通过命名空间引用它们。The accumulation of those triples will tell us eventually, this person is an expert in the service systems, or in Kafka and so forth. We also have these service topologies on a Turtle that already exists, because we build it from the ground up from many sources, using eBPF and logs and tracing. We created this graph of all our thousands of dependencies of services, which service calls each other. That's part of it. The contract is for the enrichers, we have a class, which is an interface where you can see the enrichment part, you can add triples to the graph and so forth. We have many of these, and more enrichers come as more data come in. Claude will actually tell us we need to build a new enricher because we're seeing this new thing that I don't know about from previous history and so forth. It's not in the code. It's not in the ontology. We need to create. Every URI in the entities are stable. We have a domain and IDs. We can always reference them by namespace.

从图开始,我们进入知识库。每次采集器运行时,流程都会将 Turtle 文件保存到 S3。我们会创建一个 Parquet 文件。我们的图数据库会持续轮询这个数据流。实际上,这是一个 CDC(变更数据捕获)数据流,会将这些三元组加载到内存中。这样我们就能实时查询,因为此时数据已经就绪。比如,我们已经描述了这起事件。其他人可以在 Claude Code 会话、Cursor 或其他工具中,查询事件 123 的进展。我们已经有了这些数据。LLM 会执行 SPARQL 查询并开始提问,然后或许会将它与过去的另一起事件关联起来,等等。你还可以使用其他 MCP 工具等。我们也会保存 Blob。例如,当有人上传一张图时,该文件会保存到 S3,而且我们知道它与某个指标相关。From a graph, we go into a knowledge base. The process again, at every run of the harvester, we save the Turtle files in S3. We create a Parquet file. We have our graph database that is constantly polling that stream. It's actually a CDC, change data capture stream that loads those triples in memory. We can query in real time, because then we have the data. We have described the incident, for example. Someone else from a Claude Code session, or Cursor, or whatever can be querying what's going on with incident 123. We already have that data. The LLM will go make SPARQL queries and start asking questions, and then maybe correlate it to another incident in the past, and so forth. You use other MCP tools and so forth. We also save Blobs. For example, when someone uploads a graph, that file will be saved in S3, and we know it's related to a metric.

这就是所用的查询。所有内容都有描述。实际的图,也就是我说的仪表板图表,有一张截图。截图已保存,字节存放在 S3 中。那个 Blob 本身也是一个实体。一切都彼此关联。我们可以恢复所有这些数据。也许你想做取证分析,把数据找回来,并准确还原事情发生的经过。这个本体是混沌与理解之间的一份契约。我们的随机引擎受这一套以本体为基础的强类型系统约束,并生成可供查询的确定性三元组。我们就是这样从事件本体起步的:几个命名空间,以及许多智能体和信号。This is the query used. All that is described. The actual graph, the graph I mean the dashboard graph, it has a screenshot. The screenshot is saved, the bytes in S3. That Blob is also an entity. Everything is linked. We can recover all that data. Maybe you want to do forensic analysis and bring it back and get what happened exactly when things occurred. The ontology is a contract between chaos and understanding. Our stochastic engines are constrained to this very strong type system grounded on the ontology, and they emit deterministic triples that can be queryable. That's how we started with the incident ontology, a few namespaces, many agents and signals.

这是我们每次运行都会生成的工件之一。它只是一个保存在 S3 中的 HTML 文件。我们用它来调试,因为我会查看它,确认提取的内容是否正确。我知道里面应该有 Jira 问题、Slack 用户、文件附件以及所有这些内容。每次运行时,我有时会发现它没有找到文件附件。我需要有一些工件,有个目标,因为我一直在看代码。我只是在查看这些结果,因为我知道里面应该包含什么。如果缺了,我们就得继续修复。最后,借助这个工件,我可以进行检查。这只是事件的时间线。所有内容都有类型并相互链接。这是一起涉及许多关系的重大事件。拓扑结构和服务依赖关系也都编码在里面。任何人都可以询问相关问题,比如涉及哪些团队。This is one of the artifacts that we produce on every run. This is just an HTML file saved in S3. We use this to debug, because I was just looking, is it extracting the right things? I know there has to be a Jira issue, or Slack users or file attachments and all those things. Every run, sometimes I realize, it's not finding file attachments. I need to have some artifacts, some goal, because I'm looking at the code all the time. I'm just looking at these results because I know what has to be in there. If it's not there, we need to keep fixing. Finally, by using this artifact, I could inspect. This is just a timeline of the incident. Everything is typed and linked. This is a big incident with many relationships. The topology, the service dependency is also encoded in there. Anyone can ask any questions, which teams are involved.

这里谁的情绪比较低落?谁压力特别大,诸如此类?所有这些都相互关联。想象一下,所有这些事件都汇聚到一张大图中,这样我们就能同时查询它们。真正的挑战在于让所有这些数据随时间持续流动,这就是我们所说的“时间旅行”。目前,我们只保存几周的数据。所有这些数据都存储在 S3 中,所以最终我们可以构建一个超大型数据库,随时进行查询。Who has low sentiment here? Who's very stressed, and all that? Everything is linked. Imagine all these incidents gluing up in the big graph so we can query them at the same time. The challenge is actually to keep all this data flowing in time, what we call the time travel. For now, we're just saving a few weeks of data. All this data is in S3, so eventually we can come up with a really big database that we can query at any time.

AutoSRE——让本体发挥作用AutoSRE - Putting the Ontology to Use

我们如何使用本体?其中一个应用就是我们所说的 AutoSRE,也就是我们的 AI SRE 解决方案。这是如今业内对这类方案的称呼:利用 AI 辅助站点可靠性工程(SRE)。我们就称它为 AutoSRE。AutoSRE 会实时接入指标、日志和链路追踪数据,也会接入 Slack。它掌握拓扑信息,也掌握设备信息,并能查看端到端图谱,也就是设备之间的图谱。它还会接入本体,也就是知识图谱,其中包含作为领域概念的更高层级关系。 回到 LOLOMO 事件或问题,AutoSRE 不仅能辅助值班人员,还会分析所有 MELT 数据,以及正在运行的所有 A/B 测试版本,然后以比人类快得多的速度进行关联分析。它会找出涉及哪些事件或应用,等等。它也能找到相关日志。How do we use the ontology? One of the applications is what we call the AutoSRE. It's our AI SRE solution. That's the name now in the industry, for site reliability, aiding SRE with AI. We call it that. What AutoSRE does is taps into the metric, logs, and traces in real time, in also Slack. It has the topology, it has devices as well, and ways of looking at the end-to-end graph, which is the devices. Taps into the ontology, so in the knowledge graph, which is higher creative relationships as domain concepts. Going back to the LOLOMO incident or issue, AutoSRE comes in, not only the on-call, and it analyzes all the MELT data and versions of all the A/B tests that's running, and then it does correlation much faster than humans. It finds what incidents or apps are involved in it, and so forth. It finds logs as well.

它会利用这一点。我们有一大批 MCP 和 CLI 工具来查询基础设施,不仅查询本体,也会查询更广泛的数据。它也会查看代码,和市面上许多解决方案一样,因为如果不深入代码,就无法理解系统。它生成的结果是这样的:这项记录操作出现了 GraphQL 错误激增,接下来的步骤如下。我们实际上还为此添加了交互功能,用户可以提出后续问题,因为如今很难让 AI 第一次就给出正确答案。你需要经过多轮迭代,逐步深入排查,因为 LLM 可能会跑偏之类的。It uses that. We have a bunch of MCPs and CLI tools querying the infrastructure, not only in ontology, but also really the data in general. It also looks at code, as many solutions out there do, because you cannot understand systems if you don't go down into the code. This is what it produces. It says, there was a GraphQL error spike for this record operation, and the next steps are these. We have actually added interactivity to this, where users can ask follow-up questions, because it's really hard to get any AI today to give you the right answer on the first go, in the first loop. You need to go through many iterations to dig in, because the LLMs can wander and stuff.

未来会怎样What the Future Holds

未来会给我们带来什么?有三件事。我们希望实现自动根因分析,不想再不断深挖。我们只要让水晶球直接告诉我们根因是什么。接下来是真正实现自动修复。比如,如果我们知道这些模式会出现,我们的本体就会告诉我们:在这种情况下,最好的做法就是终止这个实例。好,那就执行。自动修复,甚至无需人工介入。第三件事是自愈基础设施。这就是我们的梦想。我们甚至不想等到事故发生,也不想收到告警。我们想不断左移、再左移,直到基础设施能够自我修复。因为最终,我们描述的不仅是事故或运营数据,还会把本体一路融合到数据血缘,追溯到比如一部电影是如何创作出来的。What the future holds for us? There are three things. We want to find automatic root cause analysis. We don't want to keep digging. We can just give the crystal ball, this is the root cause. Next is to actually do auto-remediations. For example, if we know these patterns occur, the ontology, we'll say, in this situation, the best thing to do is just to terminate the instance. Fine. Do it. Auto-remediation. Without human interaction, even. The third one is self-healing infrastructure. That's the dream. We don't even want to get to an incident. We don't even want to get an alert. We want to keep shifting left and left, all the way to the point that the infrastructure is healing itself, because by the time we describe not only our incidents or our operational data, we will merge ontologies all the way to the data lineage to the point where, say, a movie is created.

由这个团队在这个时间点运行的某条数据流水线出现了错误,最终层层传导,导致用户服务上的点击效果变差。这就是我们想要实现的端到端愿景。不仅要构建本体,还要将其与其他更大的领域融合,创建一个描述所有事物的大型企业本体。这又回到了 Prasanna 展示的那个最初的端到端闭环:找到将所有较小本体连接成一个大本体的完整链条。There was a data error in a pipeline that was run by this team, by this person at this time, that cascaded into finally bad clicks on the user service. That's the end-to-end dream that we want to create. Not only forming the ontology, but merging into other bigger domains and create this big enterprise ontology that describes everything. That's going back to the original end-to-end wheel that Prasanna showed. Finding this huge cycle of connecting all the smaller ontologies into big.

有人认识《暗黑》里的这个角色吗?他们其实是时间旅行者。有一个秘密团体掌握了操控时间的能力。他们能够前往未来,实际上也能获取知识。这里的灵感来自我用的他们的一句箴言:“Der Anfang ist das Ende und das Ende ist der Anfang.”“开始即是结束,结束即是开始。”这意味着观察、丰富、推断。我只是想用这个类比来结束我们这场演示。Does anyone know this character from "Dark?" They are actually time travelers. There is a cabal that were able to harness time. They were able to go in the future, and actually, also knowledge. The inspiration here is I'm using one of their mantras. It says, "Der Anfang ist das Ende und das Ende ist der Anfang." "The beginning is the end and the end is the beginning." That means observe, enrich, infer. I just wanted to end that with that analogy to our show.

问题与解答Questions and Answers

参与者 1:在处理这些事件时,你们如何在图谱中进行去重和消歧?Participant 1: How do you deal with deduplication and disambiguation in the graph on those incidents?

Renzo Sanchez-Silva:现在,我们让 LLM 进入这个开放世界。它会进行查找并创建三元组,还会说:“不,这个关系已经存在了”,然后我们就让它创建一个。这会成为一个需要合并的分支,但我只是让它通过,它就这样不断往本体中追加内容。我们可能会得到许多相似的概念吧。我们还没检查过这一点,但理想情况下,比如对于这个较小的本体来说,这个流程已经停止了,也就是说它正逐渐趋于稳定。我看到需要合并的 PR 越来越少,诸如此类。它最终确实会趋于稳定。不过它必须经过人工审核。比如,本体专家需要实际查看并仔细检查。我看到的是,去重过程受到严格控制。这是可行的。Renzo Sanchez-Silva: Right now, we're letting the LLM go into this open world. It does lookup, and it will create the triples, and say, no, this relationship is already there, and we let it create one. It is going to be a branch that has to be merged, but I'm just letting it pass, and it just keeps appending to the ontology. We may get to many similar concepts, maybe. We haven't checked that, but ideally, for example, for this smaller ontology, the process has stopped in the sense that it's becoming stable. I see less PRs that we need to merge, and so forth. It does eventually become stable. It does have to go through a human. Say an ontologist needs to actually see this, look at it closely. What I see is that deduplication is very controlled. This is possible.

普拉萨纳·维贾亚纳坦:未来,我们也认为需要一个模式提取层,能够归纳模式以帮助去重。我们目前还没做到这一步,不过现阶段还能应付。Prasanna Vijayanathan: In the future, we also see the need to have a pattern extraction layer that can generalize patterns to help with deduplication. We're not there yet. We're able to manage.

参与者 2:在这些图中,所有内容都可能开始彼此关联。你们如何微调基础设施,以便从噪声中获得更多有效信号,确保输出的内容不是凭空编造的,也不是仅仅可能相关,而是真正可操作、真实可靠且对用户有意义的信号?Participant 2: In these graphs, everything can start relating to everything else. How do you fine-tune your infra to give you more signal over the noise, so that the things that it outputs are actually not something that has been hallucinated or possibly related, that it's actually actionable, real, and a signal for the user.

阿南德:如何消除虚假相关性?这可能做到吗?Anand: How do you remove false correlations, is that possible?

Prasanna Vijayanathan:回到传统的测试系统,我们有一个瑞士奶酪模型。我们希望尽可能提供准确且可付诸行动的信息,而现在最适合告诉我们这些信息的,就是用户。正如 Renzo 提到的,它会自行创建并自我修复,因此这一机制也已存在。我们会跟踪不同的质量指标:采集线上日志,从中提取指标,然后再通过评估系统进行评估。我们的做法是固定输入和输出,并持续测试模型的表现。此外,我们还有人在环反馈。所有这些系统都会向模型反馈信息。我们目前还没有大规模开展这方面的工作,但之后会以某种形式引入强化学习,利用这些信号来改进模型。Prasanna Vijayanathan: Going back to old testing systems, we have a Swiss cheese model. We want to be able to give as much accurate and actionable information as possible, and the best person to tell us that would be the users right now. Like Renzo mentioned, it creates and self-heals itself, so that also exists. We have different quality metrics that we track. We do online logs, and then extract metrics from that, and then we have evals systems. It's like, we freeze our inputs and outputs, and then keep testing how our model is doing. Then we have human-in-the-loop feedback. All of those systems feed back into our model, and we haven't done that extensively yet, but it'll get into some kind of reinforcement learning to use those signals, and improve itself.

参与者 3:我对规模这部分有点好奇,因为整个图似乎都是用 Turtle 表示的,就像通过 PR 编写代码一样。也就是说,这只是每秒 3200 万次查询中的一小部分,而且我们并没有把这些部分关联起来。这是一个抽象层级高得多的构造。这样理解对吗?Participant 3: I'm a bit intrigued about the scale piece, because it seems like the whole graph is in Turtle, created by PRs like code. This is a small subset, then, of those 32 million per second queries, and we're not relating those bits. It's a much higher-level construct. Is that correct?

Renzo Sanchez-Silva:这个思路是,对于这种高吞吐量处理,我们只收集元数据,也就是某件事已经开始的指纹。我们发现了这种模式,但不会用 Turtle 获取数据。没办法这么做。我们会找出正在发生的事情的指纹,然后将其与图的其余部分关联起来。同时也要始终控制基数。Renzo Sanchez-Silva: The idea is, for this high-volume throughput, we're just going to be collecting metadata, fingerprints of something has started. We have found this pattern, but we are not going to get the data on Turtle. There's no way to do that. We're going to find the fingerprint of what's happening, and then relate that for the rest of the graph. It's just always controlling cardinality as well.

参与者 4:你们如何检测到某件重要的事情没有发生,而不是仅仅发现已经发生的不良事件?Participant 4: How do you detect that something important didn't happen, instead of just picking up something bad that happened?

Renzo Sanchez-Silva:本体实际上具备非常强大的形式化推理能力。这与人工智能无关。它实际上是比例性的、逻辑性的。这里涉及非常复杂的算法,这些算法能够进行推理,发现不一致、传递性或矛盾之处。随着进展,我们也计划运用形式化推理来捕捉这些问题,不仅找出数据中的不一致之处,还要发现新的关联。我们可以在不借助人工智能的情况下进行形式化推理,也可以利用人工智能来辅助这种基础推理。Renzo Sanchez-Silva: The ontologies actually have a very powerful formal reasoning. It's not AI-related. This is actually proportional, logical. Very hard algorithms that actually can reason, can find something that is incongruent or transitive or contradictory. We also plan to use formal reasoning to catch these things as things progress. Not only to find inconsistency in data, but also to find new connections. We can do formal reasoning with non-AI, but we can also use AI to help that base reasoning.

Prasanna Vijayanathan:在这个系统中,让人参与其中也很有帮助:开发人员可能会注意到系统未能捕捉到的事情,或者我们发现了一起事故或一个确实需要解决的问题。然后,我们会调查系统为什么没能捕捉到它。事实上,最近就有这么一个案例:有人指出了问题,并问:“你为什么没告诉我这件事?”随后系统就能自行纠正,并创建一个新的配对。这就是它的另一面。Prasanna Vijayanathan: A human in the loop also helps a lot in that system, where a developer notices something that was not caught, or we notice an incident or an issue that came up that actually had to be solved. Then we would look at why the system didn't catch it. In fact, recently we had a case where someone flagged it and said, why did you not tell me this? Then it was able to correct itself, and then create a new pair. That's the other side of it.

参与者 5:你能告诉我你会允许本体多频繁地发生变化吗?这会如何影响你的知识图谱重建?Participant 5: Could you tell me how often you would allow your ontology to change? How does that affect your knowledge graph rebuild?

Renzo Sanchez-Silva:我们采用开放世界假设,让它自然发展。目前看来它是稳定的,至少在事件方面是这样,但我们也会建立与告警的关联。这是一个非常小的本体,因为我们只想捕获告警的元数据。比如,告警中的关键词或概念,以及信号都很少。对于其他内容,比如流水线、作业等,也有办法加以控制。它的规模很小。比较棘手的是事件,因为任何事情都有可能发生。概念会不断增加,但正如我所说,它最终会趋于稳定。到了一定时候,就需要回头检查,我们需要借助人工把它压缩整理好,这样它就能保持在可控范围内。我们肯定需要让人工参与其中。Renzo Sanchez-Silva: We are letting it go with the open world assumption. It seems stable, at least for the incidents, but we're also going to find connections with alerts. That's a very small ontology, because all we want to catch is the metadata of the alerts. There are very few keywords or concepts in the alert, for example, and the signals. Then for other ones, like pipelines and jobs and all that, there's also a way to control that. It's very small. What is harder is the incidents, because anything can happen. The concepts are growing, but like I said, it becomes stable. At some point, you need to go back and look, we need to compress that with humans, and then it will stay controlled. We need human in the loop, for sure.

参与者 6:有计划开源吗?Participant 6: Any plans on open-sourcing?

Prasanna Vijayanathan:也许吧。还没有。Prasanna Vijayanathan: Maybe. Not yet.

 

查看更多带文字稿的演示文稿See more presentations with transcripts

 

值得记下

  1. 在此规模下,将用户体验与系统性能关联起来是一个根本性的新挑战。这不再是一个工具挑战,而是一个数据工程挑战。
  2. 这里的悖论在于,我们使用随机工具来生成确定性的、可通过 SPARQL 查询的图谱。本体就是这座桥梁。它是我们保存所有数据的地方。
  3. 我们的目标是从非确定性中创造确定性。非确定性始于频道中的混乱,例如。

← 回到本期 · 第 5 条