error-debugging-error-analysis
有效调试生产环境错误
此技能帮助开发者快速识别生产系统错误的根本原因,并实施正确的错误处理和可观测性解决方案。
下载技能 ZIP
在 Claude 中上传
前往 设置 → 功能 → 技能 → 上传技能
开启并开始使用
测试它
正在使用“error-debugging-error-analysis”。 Analyze this error: NullPointerException at UserService.java:45
预期结果:
根据堆栈跟踪,NullPointerException源自UserService.java:45。这通常意味着传递了null值给期望非null参数的方法。建议方法:1)检查调用链以找到传递null的位置,2)在入口点添加null验证,3)考虑使用Optional类型使nullability显式化。
正在使用“error-debugging-error-analysis”。 How do I set up distributed tracing for my microservices?
预期结果:
对于分布式跟踪,我建议:1)使用OpenTelemetry进行供应商中立的检测,2)在所有服务头中实施关联ID,3)设置跟踪收集器(Jaeger或Tempo),4)在服务边界添加跟踪上下文传播。以下是中间件代码示例...
安全审计
安全This is an educational debugging and error analysis skill. Static findings flagged example code patterns in documentation (shell commands, network calls, environment variables) but these are legitimate educational examples for observability implementation. No malicious intent detected. All flagged patterns are standard debugging and logging practices documented for teaching purposes.
中风险问题 (3)
低风险问题 (1)
质量评分
你能构建什么
生产事件响应
在事件期间分析生产错误,识别根本原因,并实施即时修复和回滚计划。
调试分布式系统
使用关联ID、分布式跟踪和日志聚合跨微服务跟踪错误。
建立可观测性
为应用程序实施全面的错误跟踪、日志记录和监控。
试试这些提示
Analyze this error message and stack trace. Identify the likely root cause and suggest fixes: $ERROR_MESSAGE
Help me debug a production issue. The error is occurring in $SERVICE_NAME. Here are the relevant logs: $LOGS
I want to set up error tracking for my $LANGUAGE application. What are the best practices for $TOOL_NAME integration?
We are experiencing $ERROR_TYPE errors in our system. Walk me through the systematic debugging process to find the root cause.
最佳实践
- 在提出修复方案之前,始终在受控环境中重现错误
- 使用带关联ID的结构化日志记录来跨服务跟踪请求
- 实施错误边界和优雅降级以防止级联故障
避免
- 不进行适当日志记录和警报就忽略错误
- 在错误消息或日志中硬编码敏感数据
- 捕获异常但不采取行动或记录它们