AgentSkillsCN

observability

引入可诊断的运行时信号(日志/指标/追踪),并附带关联 ID 以及安全的日志记录实践。

SKILL.md
--- frontmatter
name: observability
description: "Add diagnosable runtime signals (logs/metrics/traces) with correlation IDs and safe logging practices."
metadata:
  short-description: Observability plan and checklist

Purpose

Use this skill to make runtime behavior diagnosable by adding logs, metrics, and traces with clear correlation.

When to use

  • Any change that affects runtime behavior or error handling.
  • Any time you are unsure which observability signals are required.

How to use

  1. Open references/observability.md and follow the templates.

  2. Define the operations that need to be observable (user-facing or system-facing actions).

  3. Identify correlation identifiers (request_id / job_id / trace_id) and ensure they are logged consistently.

  4. Add the minimum log events: start / outcome / failure, with required fields.

  5. Add metrics for errors and latency (expand to golden signals if relevant).

  6. Add trace spans and ensure logs and metrics are correlated via identifiers.

  7. Apply safety rules (no secrets/PII; follow OWASP/NIST logging guidance).

  8. Control noise (sampling, throttling, or once-only logging).

Output expectation

  • Record decisions in the Observability Plan.
  • Ensure the quality gate’s observability checklist passes.