可观测性工具并不是为AI调试设计的
Thomas Johnson
·
2026-06-15
·
via Hacker News - Newest: "AI"
Indeed, the challenges in leveraging AI for debugging and code review are significant and multifaceted. Here's a summary of the key issues and potential solutions:
### Key Issues
1. **Excessive Telemetry and Cost**:
- **Problem**: Auto-instrumentation leads to an overwhelming amount of data.
- **Solution**: Implement intelligent filtering mechanisms that prioritize critical data over noise.
2. **Missing Critical Debugging Data**:
- **Problem**: Core debugging information is often omitted due to privacy or cost concerns.
- **Solution**: Develop a framework for selective, context-aware logging and payload capture without compromising security or performance.
3. **Siloed Tools and Inconsistent Correlation**:
- **Problem**: Different tools lack the ability to seamlessly correlate data across layers of the stack.
- **Solution**: Standardize on a unified observability platform that can aggregate and correlate data from various sources.
4. **Manual Workarounds for AI Agents**:
- **Problem**: Even with access to all relevant data, manual correlation is often required.
- **Solution**: Develop advanced analytics tools that can automatically correlate events across different tools using context-aware matching techniques.
5. **Human Code Review Overload**:
- **Problem**: The volume of generated code exceeds human review capabilities.
- **Solution**: Implement automated code review systems that use AI to flag and prioritize issues for human review.
### Potential Solutions
1. **Context-Aware Logging and Filtering**:
- Implement intelligent logging policies that capture only the most critical data while filtering out noise.
- Use machine learning models to predict which logs are likely to be relevant based on historical patterns.
2. **Unified Observability Platform**:
- Develop a centralized observability platform that can aggregate data from various sources and provide unified views.
- Ensure seamless correlation of events across different layers using standardized metadata (e.g., request IDs, trace IDs).
3. **Automated Correlation Tools**:
- Build AI-driven tools that can automatically correlate events across different tools based on context-aware matching techniques.
- Use machine learning to identify patterns and relationships between logs, traces, and payloads.
4. **Selective Data Capture**:
- Implement selective data capture mechanisms that focus on capturing payload data only when necessary (e.g., during critical operations).
- Use encryption and anonymization techniques to protect sensitive information while still providing useful context for debugging.
5. **Automated Code Review Systems**:
- Develop AI-driven code review systems that can flag potential issues, prioritize them based on severity, and provide actionable insights.
- Integrate these systems with existing CI/CD pipelines to ensure continuous monitoring and improvement of code quality.
### Conclusion
While the challenges are significant, a combination of intelligent data management, unified observability platforms, and advanced AI-driven tools can help overcome many of the obstacles. By focusing on context-aware logging, selective data capture, and automated correlation, organizations can leverage AI effectively for debugging and code review while maintaining security and performance.
Would you like to explore any specific aspect further or discuss potential implementation strategies?,和识别他们可能遗漏的边界情况。即使几周后你再回顾自己的代码也不是更容易:我们的记忆是不可靠的,文档通常也没有那么完整。
现在再加上一个AI助手可以比任何人更快地[编写代码](https://leaddev.com/ai/shipping-faster-thinking-less-the-ai-code-verification-trap)。AI可以在30秒内生成100行看起来合理的代码。而彻底审查这同样的100行代码可能需要15到20分钟。数学上是不成立的:团队要么在审核环节卡壳,要么让问题漏网。
而且确实有东西会漏网。AI生成的代码通常适用于模型想象的理想路径,但不会像经验丰富的开发人员那样防患未然地思考。它基于之前看到的内容进行模式匹配,而不是考虑边界情况、错误状态或意外输入。
结果是?即使每行代码中的bug率保持不变,你更快地发布了更多代码,这意味着绝对数量的bug增加了。由于AI生成的代码编译干净且结构上看起来正确,在审核中发现bug更难。代码看起来没问题。只是在AI未曾考虑的情况下,在生产环境中失败了。
这就是“AI使你10倍高效”的说法开始失效的地方。“一次尝试就编译通过”并不意味着代码是正确的,这意味着你将调试工作推迟到了bug进入生产环境之后。
可观测性差距进一步加剧了这个问题。没有完整的运行时上下文(实际负载、外部API响应、会话状态),你在时间压力下基于不完整的信息逆向推理自己未写的逻辑。
需要改变的是什么?
观测性行业已经开始认识到这些问题,但提出的解决方案只解决了拼图的不同部分。
方法1:收集层的智能过滤
一些供应商提倡智能化的数据管道:
[应用]
→ [发送一切]
→ [智能AI收集器]
→ [决定保留/丢弃/升级]
→ [存储]
→ [AI获得干净数据]
想法是在收集层使用AI来过滤掉噪声,然后再存储。保留致命错误,丢弃健康检查,并基于看起来重要的内容进行采样。
这在一定程度上解决了数据关联问题:如果供应商在一个地方收集会话重放、指标、日志和跟踪,那么他们的AI代理可以在不查询多个API的情况下跨所有这些信息进行关联。
然而我们又回到了“太多无关的数据”问题。缺失的数据仍然是缺失的,并且现在还增加了厂商锁定的问题。
方法2:基于会话的需求驱动采集
有第三种方法翻转了模型:而不是收集一切并在之后决定保留什么,只在需要时、特定上下文下收集所需的内容。
这个模式如下:
[用户报告bug]
→ [触发用户的会话录制]
→ [捕获所有内容:前端+后端+请求/响应负载]
→ [按会话自动关联]
→ [AI获得完整上下文]
这解决了采集和存储成本问题,会话中捕获的所有内容默认已经关联,没有被采样或事后删除。

柏林 • 2026年11月9日 & 10日
AI. 疲劳. 大决策。
压力是真实的。柏林是你克服它的地方。
AI调试的数据问题
这些都是无可争议的事实:
我们收集了太多无关(且昂贵)的遥测数据。
由于仪器成本和工具隔离,我们缺失了关键的调试数据。
AI工具需要更好的数据(未采样且会话关联)才能在调试时有用。
缺少的是认识到这是一个根本上的数据和上下文问题,而不是一个AI问题。你不能通过扔出更聪明的模型来解决糟糕的数据问题。
AI代理只能访问它们可以获取的数据。给代理提供大量嘈杂、被采样的遥测数据没有帮助。提供关联且完整的会话数据,每部分都已经链接且没有任何缺失,则改变了游戏规则。
与其“这里有日志和跟踪ID,请找出发生了什么”,你可以把AI交给:这里是一整段用户做了什么的完整录制,系统发送和接收了什么以及哪里出错的地方。前进的道路是收集正确的数据和上下文,在正确的时间以已关联并准备好使用的格式进行采集。无论消费者是一个人类在调试问题还是一个帮助他们更快完成工作的AI代理。

柏林 • 2026年11月9日 & 10日
AI. 疲劳. 大决策。
压力是真实的。柏林是你克服它的地方。
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。