Distributed Tracing

Use when instrumenting or diagnosing distributed requests, service dependencies, latency, retries, failures, or trace-to-log correlation.

9 stars 3 forksOther

Install

skills CLI (Claude Code, Cursor, Codex and more)
npx skills add sandbaseai/workbuddy-skill --skill distributed-tracing
Manual install
git 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-tracing

Personal 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
```

## 采样与成本
Read the full skill on GitHub

Details

Skill name
distributed-tracing
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

Browse the most popular Claude skills, all other skills, or write your own with the skills generator.