cargo check
cargo test
cargo clippy
RUST_LOG=info cargo run
Related Skills
rust-web
rust-database
rust-concurrency
Localized Reference
Original Chinese version is preserved in SKILL_ZH.md.
1---2name: rust-observability3description: ---4---5---6name: rust-observability7description: "Rust observability skill for tracing, metrics, structured logging, OpenTelemetry pipelines, and production incident diagnostics."---89# Rust Observability Skill1011## Core Question1213**Which telemetry signals reduce mean time to detect and resolve production failures?**1415## Signal Model1617- Logs: contextual events and state snapshots.18- Traces: cross-service causal path and latency breakdown.19- Metrics: rate/error/duration + saturation and capacity.2021Use all three intentionally, not interchangeably.2223## Instrumentation Priorities24251. Request entry/exit and key business operations.262. Downstream calls (DB, cache, RPC, queue).273. Retry/timeouts and circuit-breaker transitions.284. Queue depth and worker saturation.2930## Logging Rules3132- Structured logs only.33- No secrets/tokens/PII leakage.34- Stable field names for dashboards and alerts.3536## Metrics Rules3738- Keep label cardinality bounded.39- Prefer RED + USE style baseline metrics.40- Track queue/worker/resource saturation explicitly.4142## Common Pitfalls4344- High-cardinality labels (raw user/session IDs).45- Verbose debug logs on hot paths in production.46- Traces without propagated correlation context.47- Alert thresholds not aligned with SLOs.4849## Review Checklist5051- [ ] Critical path spans and error fields exist.52- [ ] Metrics cover latency/errors/saturation.53- [ ] Correlation IDs flow across service boundaries.54- [ ] Logging policy prevents sensitive data exposure.55- [ ] Alerts map to actionable runbooks.5657## Verification Commands5859```bash60cargo check61cargo test62cargo clippy63RUST_LOG=info cargo run64```6566## Related Skills6768- `rust-web`69- `rust-database`70- `rust-concurrency`7172## Localized Reference7374- Original Chinese version is preserved in `SKILL_ZH.md`.
Run npx skillmds@latest add huiali/rust-observability in your terminal (requires Node.js), paste this page's agent-chat prompt into Claude, Cursor, or any MCP-connected agent, or download the SKILL.md file and copy it into your agent's skills directory.
--- It is listed under Coding & Dev Tools on SkillMD.
This skill has not completed SkillMD's automated safety review yet. SkillMD never runs a skill's scripts for you; review the SKILL.md before installing.
This skill is tagged as working with Claude Code, Claude.ai, OpenAI Codex. SKILL.md is an open format, so most agents that read a skills directory can load it too.
Yes. Installing skills from SkillMD is free, and the skill stays under its author's original license.
huiali (@huiali) published this skill. Their other Agent Skills are listed on their SkillMD profile.