‹ 首页

observability

@developersglobal · 收录于 1 周前

Structured logging, distributed tracing, and alerting for AI systems and traditional services. You can't fix what you can't see.

适合你,如果想让系统运行状态一目了然,快速定位问题。

/ 下载安装
observability.skill双击,或拖进 Claude 桌面版 / Cowork,即完成安装↓ .skill↓ .zip
用别的 agent?下载 .zip 解压,把文件夹放进它的技能目录
Claude Code~/.claude/skills/(项目级 .claude/skills/)
Codex CLI~/.codex/skills/
Cursor自动读取上面两处目录
其他工具见其文档的「skills」目录;两个下载是同一份文件,只是名字不同
/ 通过 npx 安装 校验哈希
npx oh-my-skill add developersglobal/ai-agent-skills/observability
/ 通过 bash 安装
curl -fsSL https://oh-my-skill.com/install.sh | bash -s -- developersglobal/ai-agent-skills/observability
/ 已经装过?验证本机副本,不用重装
npx oh-my-skill verify developersglobal/ai-agent-skills/observability
安装目标可用 --agent / --scope 或 --to 明确指定;省略时只会在唯一已存在的 agent 目录上自动选择,零命中或多命中会停止并提示。content_hash 缺失或不一致均拒装。
64GitHub stars
~787上下文体积 · 单文件
镜像托管

怎么用

技能原文 SKILL.md作者撰写 · MIT · f47f948
Overview

Observability is the ability to understand the internal state of a system from its external outputs. For AI systems this is especially critical: agents make decisions that are hard to interpret without detailed telemetry.

The three pillars: Logs (what happened), Traces (how long and where), Metrics (aggregate health).

When to Use
  • Before deploying any new service to production
  • When adding AI agent capabilities to an existing system
  • When debugging production issues
  • When designing multi-agent pipelines
Process
Step 1: Structured Logging
  1. All logs must be structured (JSON, not free text). Fields: timestamp, level, service, traceId, message, context.
  2. Log levels used correctly:
  3. ERROR: Something failed that requires immediate attention
  4. WARN: Something unexpected happened but the system recovered
  5. INFO: Normal significant events (requests received, jobs completed)
  6. DEBUG: Detailed diagnostic information (off in production by default)
  7. Never log secrets, PII, or auth tokens.
  8. For AI systems, log: prompt inputs (sanitized), model outputs, token counts, latency, model version.

Verify: Logs are structured JSON. No secrets in logs. AI interactions logged.

Step 2: Distributed Tracing
  1. Every request gets a unique traceId generated at the entry point.
  2. traceId is propagated through all downstream calls (HTTP headers, message queues, agent calls).
  3. Each service/agent creates a span for its work, with: start time, end time, parent span ID.
  4. Use OpenTelemetry as the standard instrumentation library.

Verify: You can trace a single request across all services/agents in a single view.

Step 3: Metrics
  1. Define and track key metrics:
  2. RED metrics: Rate (requests/sec), Errors (error rate %), Duration (latency p50/p95/p99)
  3. AI-specific: Token usage, prompt cost, model latency, hallucination rate, retrieval precision
  4. Dashboards: one dashboard per service with RED metrics, one dashboard for AI system health.

Verify: RED metrics are tracked for every service. AI-specific metrics tracked for AI systems.

Step 4: Alerting
  1. Alerts must be actionable — every alert should have a runbook.
  2. Alert on symptoms (high error rate, high latency), not just causes.
  3. AI-specific alerts: token budget exceeded, model error rate spike, retrieval failure rate spike.
  4. On-call rotation: someone is responsible for every alert at all times.

Verify: Every alert has a runbook. On-call rotation defined.

Common Rationalizations (and Rebuttals)

| Excuse | Rebuttal | |--------|----------| | "We'll add monitoring after launch" | You'll be fighting fires blind. Add it before. | | "Console.log is enough" | In production, console.log is noise. Structured logs with context are signals. | | "The AI model handles it internally" | Model internals are a black box. You must observe the inputs and outputs. |

Verification
  • [ ] Structured JSON logging on all services
  • [ ] No secrets in logs
  • [ ] Distributed tracing with trace ID propagation
  • [ ] RED metrics tracked for all services
  • [ ] AI-specific metrics tracked (tokens, cost, latency)
  • [ ] Alerts configured with runbooks
References
  • [production-deployment skill](../production-deployment/SKILL.md)
  • [multi-agent-orchestration skill](../multi-agent-orchestration/SKILL.md)
  • OpenTelemetry documentation
按 MIT 许可原样转载,未经改动 · 在 GitHub 查看 →

评论

登录即可评论;带「已验证安装」的,是发布者名下有本店的安装或持有记录。