Use when adding tracing, metrics, 链路追踪, TraceId, 慢接口排查, 全链路压测, or production incident workflow. Skip when the task is greenfield CRUD with no performance or incident context.
Scanned 9/3/2026
Install to Claude Code
npx -y skills add 1398281322-a11y/java-backend-guardrails --skill observability --agent claude-codeInstalls into .claude/skills of the current project.
Are you the author of Observability?
Add the live security badge to your README — it updates automatically with every re-scan.
[](https://www.skillsdirectory.com/skills/1398281322-a11y-observability)More formats (shields.io, HTML) on the badges page.
---
name: observability
description: Use when adding tracing, metrics, 链路追踪, TraceId, 慢接口排查, 全链路压测, or production incident workflow. Skip when the task is greenfield CRUD with no performance or incident context.
---
# 可观测 / 线上排查
## When to Invoke
慢接口、偶发失败、要加监控、事故复盘、全链路压测。高级面常问「线上 RT 高你怎么查」。
## When NOT
还没写业务就上完整 APM 平台当任务本身。先有 TraceId 和关键指标。
## 风险(面试考点)
没有 **同一 TraceId** 穿网关→服务→MQ→DB,日志对不上。指标只看 CPU 会误判(可能是锁、GC、慢 SQL、依赖超时)。压测不带数据隔离会打脏生产。
排查顺序(固定):
1. 是全站还是单接口、从何时开始
2. 错误率 / RT / QPS 哪个变了
3. 依赖 RT(DB、Redis、Feign、MQ 积压)
4. 实例是否均衡、GC、线程池拒绝
5. 单请求日志(TraceId)看卡在哪一段
不要先 dump 堆。
## 方案选型(轻量优先)
| 层 | 默认 |
|----|------|
| 日志 | 每条带 `traceId`、`userId`、`orderNo` |
| 指标 | QPS、RT P99、错误率、线程池、DB 连接池、MQ 积压 |
| 追踪 | 网关生成 TraceId,Feign/MQ 透传 |
| 告警 | 错误率、P99、积压、拒绝次数,不是 CPU 单指标 |
## 默认方案
MDC 放 TraceId;HTTP 头 `X-Trace-Id`;RocketMQ 属性同样透传。慢 SQL 阈值 1s 先打日志。核心接口有黄金指标看板。
压测:影子表/影子标,或预发全量。生产全链路压测必须能识别压测流量并隔离写。
## 反例
错误:RT 高先重启再 dump。
正确:按上面 1–5。
错误:日志没有业务单号,只能搜时间。
正确:`orderNo` 可检索。
错误:只监控机器 CPU。
正确:先看接口和依赖。
## 验证
- 任意失败请求能用 TraceId 串起网关到 DB。
- 人为把从库打慢,看板能显示是 DB 不是 JVM。
## 评审清单
- [ ] 写路径日志有业务键 + TraceId
- [ ] 核心接口有 QPS/RT/错误
- [ ] 排查顺序不是先重启
---
Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.
No comments yet. Be the first to comment!
Adversarial multi-agent planning skill. Self-orchestrates 5 hostile category members (unspecified-low, unspecified-high, deep, ultrabrain, artistry) via team-mode for ruthless cross-critique debate, distills only the defensible insights, then MANDATORILY hands the distilled insight bundle to the `plan` agent for executable plan formalization. Use when planning needs maximum rigor and surfacing of weak assumptions, blind spots, and over-engineering. Triggers: 'hyperplan', 'hpp', '/hyperplan', ...
Ultra-compressed communication mode. Cuts token usage ~75% by speaking like caveman while keeping full technical accuracy. Supports intensity levels: lite, full (default), ultra, wenyan-lite, wenyan-full, wenyan-ultra. Use when user says "caveman mode", "talk like caveman", "use caveman", "less tokens", "be brief", or invokes /caveman. Also auto-triggers when token efficiency is requested.
Routes multi-tool workflows through MCP servers for large datasets and pipelines. Use when Bash tool overhead is limiting throughput on data-heavy tasks.
**Complete production-ready guide for Google Gemini embeddings API** This skill provides comprehensive coverage of the `gemini-embedding-001` model for generating text embeddings, including SDK usage, REST API patterns, batch processing, RAG integration with Cloudflare Vectorize, and advanced use cases like semantic search and document clustering. ---
Recovers prior coding-agent session context by running `catchup <agent> --since-compact`, which extracts a clean summary of a previous Codex, Claude Code, Antigravity, OpenCode, or Pi Agent session. Use when the user says "catch up", "what did the last session do", "get me up to speed", "I switched agents", or asks to recover/summarize a previous session before continuing. Do NOT use for the current conversation, git history, or any non-agent log.