Agent skill
api-tracing
Instrument API requests with spans and distributed tracing. Use when tracking request latency or debugging API issues.
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/data/api-tracing
SKILL.md
API Tracing
Measure API requests and correlate with backend traces.
What to Capture (OTel-Compatible)
| Attribute | OTel Name | Purpose |
|---|---|---|
| Method | http.request.method |
GET, POST, etc. |
| Status | http.response.status_code |
Success/failure |
| URL | url.path |
Endpoint (sanitized) |
| Duration | http.request.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
skills/error-tracking- API error handlingskills/route-transition-tracking- Data fetch during navigationreferences/otel-web.md- OpenTelemetry naming
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
Didn't find tool you were looking for?