Claude-skill-registry api-tracing
Instrument API requests with spans and distributed tracing. Use when tracking request latency or debugging API issues.
install
source · Clone the upstream repo
git clone https://github.com/majiayu000/claude-skill-registry
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/majiayu000/claude-skill-registry "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/data/api-tracing" ~/.claude/skills/majiayu000-claude-skill-registry-api-tracing && rm -rf "$T"
manifest:
skills/data/api-tracing/SKILL.mdsource content
API Tracing
Measure API requests and correlate with backend traces.
What to Capture (OTel-Compatible)
| Attribute | OTel Name | Purpose |
|---|---|---|
| Method | | GET, POST, etc. |
| Status | | Success/failure |
| URL | | Endpoint (sanitized) |
| Duration | | Request time (ms) |
Using OTel naming now = easier migration later.
Key Thresholds
| Metric | Good | Acceptable | Poor |
|---|---|---|---|
| p50 | <200ms | <500ms | >500ms |
| p95 | <1s | <2s | >2s |
| Error rate | <0.1% | <1% | >1% |
What NOT to Log
| Don't | Why |
|---|---|
| Request bodies | PII risk |
| Auth headers | Security |
| Full response data | Size limits |
| User tokens | Security |
Do log: Request ID, sanitized path, status code, duration, error type.
Implementation
See
templates/api-interceptor.ts for fetch/axios interceptors.
Use Read tool to load template when generating implementation.
Related
- API error handlingskills/error-tracking
- Data fetch during navigationskills/route-transition-tracking
- OpenTelemetry namingreferences/otel-web.md