Back to home

Compare

Comparing: Agent Debugging Now Requires End-to-End Tracing, Not More Logs & Agent 故障排查开始依赖全链路追踪,而不只是多写几条日志

AEN
OpenTelemetryAgentObservability·

Agent Debugging Now Requires End-to-End Tracing, Not More Logs

During an order lookup, both the model invocation and tool call report success, yet the assistant returns the wrong details for order 1001. This shows that failures in Agent systems often lie not in whether an error was raised, but in whether each step actually achieved its business objective. Observability—the ability to explain a system’s state through traces, data, and runtime metrics—is becoming an essential engineering capability for deploying Agents.

What this is

Observability means more than keeping another copy of runtime logs. It means correlating model calls, knowledge retrieval, tool execution, and approval waits within a single task. A Trace—a complete execution chain—reconstructs the process, while Spans, the units of work within a trace, record the duration and result of each step. Structured logs preserve queryable key fields, and metrics reveal overall trends.

For example, after a tool returns an order, the system must still verify that the order number, user permissions, and business status match. The absence of an API exception does not prove that the answer is correct. The article also emphasizes that task IDs and per-execution Trace IDs should be managed separately; otherwise, traces can break when work resumes across approvals or services.

Industry view

We believe this will change the cost structure of enterprise Agent projects: the more models, retrieval systems, and business interfaces a project combines, the less engineers can rely on manually digging through logs layer by layer. Metrics can first surface anomalies in validation failure rates, repeated calls, or P95 latency—the duration within which 95% of requests complete—after which traces can locate specific samples. This is far more efficient than blindly swapping models or prompts.

The risks are equally clear. Observability does not automatically fix errors. Recording complete inputs, tool results, and usage increases storage costs and may expose sensitive information such as order records. Using high-cardinality task IDs as metrics can also raise monitoring query and storage overhead. More importantly, if enterprises continue to treat HTTP 200 as proof of task success, adding more tools will only produce a more detailed map of the failure.

Impact on regular people

For enterprise IT: Agent vendors, cloud platforms, and enterprise operations systems will increasingly provide trace visualization, failure classification, and human takeover capabilities. Procurement priorities will expand from “model capability” to “can we determine what went wrong when something fails.”

For individual careers: Answers from knowledge-base, customer-service, and office assistants will become more traceable, but that does not mean errors will disappear. People who can design business validation, access controls, and workflows may become scarcer than those who only know how to invoke models.

For the consumer market: When an AI assistant makes a mistake, merchants will find it easier to identify whether the source was the information, the model, or the order interface. In the short term, consumers will still need to verify amounts, times, and other key facts. How quickly providers correct errors will become a differentiator in user experience.

Source: juejin.cn
BZH
OpenTelemetryAgent掘金·

Agent 故障排查开始依赖全链路追踪,而不只是多写几条日志

一次订单查询,模型调用和工具调用都显示成功,助手却把订单 1001 答成了另一张订单。这说明 Agent 系统的故障往往不在“有没有报错”,而在各步骤是否真正完成了业务目标。可观测性(能通过链路、数据和运行指标解释系统状态)正在成为 Agent 落地的工程基本功。

这是什么

可观测性不是多存一份运行日志,而是把一次任务中的模型调用、知识检索、工具执行和审批等待关联起来。Trace(完整执行链)负责还原过程,Span(链中的工作单元)标记每一步的耗时和结果,结构化日志保留可查询的关键字段,指标则用于发现整体趋势。

例如,工具返回订单后,系统还要验证订单号、用户权限和业务状态是否匹配。仅看到接口没有抛异常,不能证明答案正确。文章还强调,任务 ID 与单次执行的 Trace ID 应分开管理,否则跨审批、跨服务恢复后,链路容易断裂。

行业怎么看

我们认为,这会改变企业 Agent 项目的成本结构:模型、检索和业务接口越多,排障越不能依赖工程师逐层翻日志。指标可以先发现校验失败率、重复调用或 P95 延迟(95% 的请求不超过的耗时)异常,再由链路定位具体样本,效率明显高于盲目更换模型或提示词。

风险也很明确。可观测性不会自动修复错误,记录完整输入、工具结果和用量会增加存储成本,还可能暴露订单等敏感信息;依赖高基数任务号做指标,会推高监控系统的查询与存储开销。更值得警惕的是,若企业仍把 HTTP 200 当作任务成功,再多工具也只会得到一张更精细的错误地图。

对普通人的影响

对企业 IT:代理商、云平台和企业运维系统会更多提供链路追踪、失败分类与人工接管能力,采购重点将从“模型能力”扩展到“出了问题能否查清”。

对个人职场:知识库、客服和办公助手的回答会更可追溯,但这不意味着错误消失。具备业务校验、权限控制和流程设计能力的人,可能比只会调用模型的人更稀缺。

对消费市场:AI 助手出错后,商家更容易定位是资料、模型还是订单接口的问题。消费者短期内仍需核对金额、时间和关键事实,服务商的纠错速度将成为体验差异。

Source: juejin.cn