network-tracing
Instrument API requests with spans and distributed tracing. Use when tracking request latency, correlating client-backend traces, or debugging API issues.
Works with
---
name: network-tracing
description: Instrument API requests with spans and distributed tracing. Use when tracking request latency, correlating client-backend traces, or debugging API issues.
license: MIT
---
# 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 |
| 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.More Observability skills
google-agents-cli-observability
google/agents-cli
>
azure-observability
microsoft/azure-skills
Azure Observability Services including Azure Monitor, Application Insights, Log Analytics, Alerts, and Workbooks. Provides metrics, APM, distributed tracing, KQL queries, and interactive reports. USE FOR: Azure Monitor, Application Insights, Log Analytics, Alerts, Workbooks, metrics, APM, distributed tracing, KQL queries, interactive reports, observability, monitoring dashboards. DO NOT USE FOR: instrumenting apps with App Insights SDK (use appinsights-instrumentation), querying Kusto/ADX clusters (use azure-kusto), cost analysis (use azure-cost-optimization).
social
coreyhaines31/marketingskills
When the user wants help creating, scheduling, or optimizing social media content for LinkedIn, Twitter/X, Instagram, TikTok, Facebook, or other platforms, or wants to do social listening and engagement triage. Also use when the user mentions 'LinkedIn post,' 'Twitter thread,' 'social media,' 'content calendar,' 'social scheduling,' 'engagement,' 'viral content,' 'what should I post,' 'repurpose this content,' 'tweet ideas,' 'LinkedIn carousel,' 'social media strategy,' 'grow my following,' 'TikTok video,' 'Reels,' 'Shorts,' 'video script,' 'video hook,' 'short-form video,' 'create a reel,' 'social listening,' 'brand mentions,' 'competitor monitoring,' 'top posts to comment on,' 'find people asking for,' 'carousel,' 'slide-by-slide,' or 'document post.' Use this for social media content creation, repurposing, scheduling, short-form video scripting, and social listening. For broader content strategy, see content-strategy. For paid ads, see ad-creative. For earned media, see public-relations.

