network-tracing
БесплатноБез исполняемых скриптовНе проверенInstrument API requests with spans and distributed tracing. Use when tracking request latency, correlating client-backend traces, or debugging API issues.
Об этом скилле
Network Tracing
Measure API requests and correlate with backend traces.
What to Capture (OTel-Compatible Names)
| 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) |
| Size | http.response.body.size |
Payload bytes |
Using OTel naming = easier migration when OTel mobile matures.
See references/otel-mobile.md for rationale.
Distributed Tracing
Propagate trace context to backend:
Client Request
│
├── traceparent: 00-{trace_id}-{span_id}-01
├── X-Request-Id: {uuid}
└── X-Session-Id: {session}
│
▼
Backend (correlates logs with trace_id)
Key Thresholds
| Metric | Good | Acceptable | Poor |
|---|---|---|---|
| API p50 | <500ms | <1s | >1s |
| API p95 | <2s | <5s | >5s |
| Error rate | <1% | <3% | >3% |
Integration Options
Choose based on existing vendor:
| Vendor | iOS | Android | Approach |
|---|---|---|---|
| Sentry | Auto URLSession swizzling | OkHttp integration | Automatic |
| Datadog | URLSession delegate | OkHttp interceptor | Semi-auto |
| Embrace | Auto-instrumentation | Auto-instrumentation | Automatic |
| New Relic | Auto URLSession instrumentation | Auto OkHttp/HttpURLConnection | Automatic |
| Custom | Manual interceptor | Manual interceptor | Manual |
Automatic (swizzling): Less code, may miss custom clients Manual (interceptors): More control, works with any HTTP client
Platform Integration Points
| Platform | Manual Option | Works With |
|---|---|---|
| iOS | URLSession delegate | All URLSession-based clients |
| iOS | Alamofire EventMonitor | Alamofire |
| Android | OkHttp Interceptor | OkHttp, Retrofit |
| Android | Ktor HttpClientPlugin | Ktor |
| RN | fetch wrapper | Native fetch |
| RN | axios interceptor | axios |
Implementation
See references/mobile-challenges.md (Client-Backend Correlation) for:
- W3C trace header format
- Platform-specific interceptor code
- Backend log correlation patterns
See references/performance.md (Network section) for latency budgets.
Установить network-tracing в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл network-tracing?
Instrument API requests with spans and distributed tracing. Use when tracking request latency, correlating client-backend traces, or debugging API issues.
Как установить скилл network-tracing?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл network-tracing запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
mcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
от Anthropicclaude-api
Reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
от Anthropicalgorithmic-art
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
от Anthropicmcp-integration
This skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…
от Anthropic