Distributed Tracing
Use when instrumenting or diagnosing distributed requests, service dependencies, latency, retries, failures, or trace-to-log correlation.
Install
npx skills add sandbaseai/workbuddy-skill --skill distributed-tracinggit clone --depth 1 https://github.com/sandbaseai/workbuddy-skill.git /tmp/workbuddy-skill
mkdir -p ~/.claude/skills
cp -r /tmp/workbuddy-skill/skills/distributed-tracing ~/.claude/skills/distributed-tracingPersonal skills live in ~/.claude/skills. Use .claude/skills in a project folder to share a skill with your team.
From the SKILL.md
# Distributed Tracing
用 trace 重建一次请求跨服务、队列、数据库和外部 API 的路径,回答“哪里慢、哪里失败、哪次变更影响了它”。追踪是抽样的诊断证据,不是完整审计日志;必须同时管理上下文、隐私、采样、保留、成本和证据局限。
## 使用边界
- 开始前确认服务拓扑、协议、OpenTelemetry/SDK 版本、collector、采样策略、保留周期、数据区域和访问权限。
- 默认只读检查 instrumentation、trace、span、日志、指标和部署变更;先在本地/预发布或脱敏流量验证。
- 不擅自修改生产采样率、collector 路由、保留策略、网络策略或重启服务;这些变更需要明确授权与回滚计划。
- span attributes、events、baggage 和日志不得写入 token、密码、完整请求/响应、原始 query、邮件、手机号或稳定的用户标识。需要关联时使用短期、不可逆、受控的 correlation ID。
## 追踪契约
统一服务名、环境、版本、区域和 operation 名称;span 名称描述动作而不是动态值,例如 `GET /orders/{id}`,不要把订单号放入名称。每个跨进程边界传播 W3C Trace Context;队列要区分 producer/consumer,异步任务保留 parent/links 的语义。
为关键 span 规定必需字段、允许枚举、敏感字段清单、错误语义、超时和采样规则。HTTP、数据库、消息和 RPC 优先使用 OpenTelemetry 语义约定,避免同一事实在不同服务使用不同名称。
```python
from opentelemetry import trace
tracer = trace.get_tracer("orders-service")
def process_order(order_ref: str):
# Keep only a non-sensitive operation reference; never attach raw payloads.
with tracer.start_as_current_span("process order") as span:
span.set_attribute("app.operation", "order.process")
try:
result = reserve_inventory(order_ref)
span.add_event("inventory.reserved", {"item_count": result.count})
return result
except TimeoutError as exc:
span.record_exception(exc)
span.set_status(Status(StatusCode.ERROR, "dependency timeout"))
raise
```
## 采样与成本Details
- Skill name
distributed-tracing- Repository
- sandbaseai/workbuddy-skill
- Path
skills/distributed-tracing/SKILL.md- License
- MIT
- Repo updated
- 8 September 2026
FAQ
What does the Distributed Tracing skill do?
Use when instrumenting or diagnosing distributed requests, service dependencies, latency, retries, failures, or trace-to-log correlation.
How do I install the Distributed Tracing skill?
skills CLI (Claude Code, Cursor, Codex and more): npx skills add sandbaseai/workbuddy-skill --skill distributed-tracing. Skills go in ~/.claude/skills (personal) or .claude/skills (project), and Claude loads them automatically when a task matches the description.
Is Distributed Tracing popular?
It lives in sandbaseai/workbuddy-skill, which has 9 GitHub stars and 3 forks.
Related skills
Access Control Security Best Practices
9sandbaseai/workbuddy-skill
Design, review, implement, and verify least-privilege access controls across users, services, tenants, resources, and administrative workflows.
Accessibility Review
9sandbaseai/workbuddy-skill
Use when reviewing a web interface or interaction for semantic, keyboard, focus, screen-reader, ARIA, and contrast accessibility risks.
Acquire Codebase Knowledge
9sandbaseai/workbuddy-skill
Use when the user asks to map, document, or onboard into an existing codebase and needs evidence-backed architecture, structure, conventions, integrations, testing, and concerns documentation.
Evaluation Methodology
9sandbaseai/workbuddy-skill
Use when measuring WorkBuddy Skill quality, interpreting evaluation results, calibrating thresholds, or deciding which triggering, output, robustness, or orchestration gap to improve first.
Data Breach Blast Radius
9sandbaseai/workbuddy-skill
Use when assessing an authorized system's sensitive-data inventory, data flows, exposure vectors, and breach impact before an incident.
Evidence Before Claims
9sandbaseai/workbuddy-skill
Use immediately before claiming work is complete, fixed, passing, committed, published, or ready for handoff; require fresh verification evidence matched to the claim.
Browse the most popular Claude skills, all other skills, or write your own with the skills generator.