Telemetry
RelayPlane collects anonymous usage data to improve routing decisions. Here's exactly what we collect and how to opt out.
relayplane telemetry offWhat We Collect
Every request generates this exact payload:
1{2 "device_id": "anon_8f3a2b1c...",3 "task_type": "code_review",4 "model": "claude-sonnet-4",5 "tokens_in": 1847,6 "tokens_out": 423,7 "latency_ms": 2341,8 "success": true,9 "cost_usd": 0.0210}| Field | Description |
|---|---|
device_id | Random anonymous ID (not fingerprintable) |
task_type | Inferred from token patterns, NOT prompt content |
model | Which model handled the request |
tokens_in/out | Token counts (not content) |
latency_ms | Request latency |
success | Whether the request succeeded |
cost_usd | Estimated cost |
timestamp | ISO 8601 timestamp of the request |
What We NEVER Collect
- ❌ Your prompts
- ❌ Model responses
- ❌ File paths or contents
- ❌ API keys
- ❌ Your identity or location
- ❌ Anything that could identify you or your project
Task Type Inference
Task types are inferred from request characteristics (token counts, ratios), never from prompt content:
quick_task, Short input/output (< 500 tokens)code_review, Medium-long input, medium outputgeneration, High output/input ratioclassification, Low output/input ratiolong_context, Input > 10,000 tokenscontent_generation, Output > 1,000 tokenstool_use, Request includes tool callsgeneral, Default classification
Local Breakdown API
The local dashboard ships with a JSON breakdown endpoint for cost rollups by model or agent:
1# Cost rows grouped by model (last 24h)2curl http://localhost:4100/v1/telemetry/breakdown?dimension=model&window=24h34# Cost rows grouped by agent (last 7d), labels resolved from local agent registry5curl http://localhost:4100/v1/telemetry/breakdown?dimension=agent&window=7dWindows: 1h, 24h, 7d, 30d. Unknown windows fall back to 24h. All data is local, nothing leaves your machine.
Verify What's Sent
You can audit telemetry before it's sent:
1# See payloads before they're sent2relayplane --audit34# Run fully offline (no telemetry at all)5relayplane --offlineOpt Out
1# Disable telemetry2relayplane telemetry off34# Check status5relayplane telemetry status67# Re-enable8relayplane telemetry onLive Telemetry API (local proxy)
The local proxy exposes a read-only telemetry API the dashboard polls. Endpoints are bound to localhost and never leave your machine.
GET /v1/telemetry/stats?days=N
Aggregate stats for the last N days. Includes a today summary with numeric fields, plus top-level latencyP95 and cacheHitRate for the window.
1{2 "today": {3 "totalCost": 1.23,4 "totalRequests": 412,5 "avgLatencyMs": 814,6 "latencyP95": 1932,7 "errorRate": 0.012,8 "cacheHitRate": 0.419 },10 "latencyP95": 1932,11 "cacheHitRate": 0.41,12 "summary": { "...legacy fields...": true }13}GET /v1/telemetry/spend-by-hour?day=YYYY-MM-DD
24 hourly buckets of spend for a single UTC day. Always returns 24 entries, zero-filled. Malformed day returns 400.
1[2 { "hour": 0, "usd": 0 },3 { "hour": 1, "usd": 0.04 },4 { "hour": 2, "usd": 0.11 },5 "...",6 { "hour": 23, "usd": 0 }7]GET /v1/telemetry/providers?days=N
Per-provider rollup over the last N days. share is 0..1 and sums to ~1.0 across providers. health is 0..100.
1[2 {3 "provider": "anthropic",4 "share": 0.62,5 "p95Ms": 1840,6 "rpm": 42,7 "health": 98,8 "primary": true,9 "note": ""10 },11 {12 "provider": "openai",13 "share": 0.38,14 "p95Ms": 920,15 "rpm": 25,16 "health": 100,17 "primary": false,18 "note": ""19 }20]GET /v1/telemetry/runs
Each record now includes routing_rule (string or null) and routing_reason (string or null) so dashboards can surface why a request landed on a given model.
GET /v1/sessions
Each session record now includes total_savings_usd (number), the per-session sum of routing savings vs the all-Opus baseline.
GET /control/budget
Single source of truth for the dashboard budget meter. Shape: { limit_usd, today_usd, hourly_usd, this_week_usd, this_month_usd }. The dashboard derives the visible cap by multiplying limit_usd by the active TODAY/7D/30D window, preferring this_week_usd / this_month_usd when those are set.
Why We Collect This
Anonymous telemetry helps us:
- Improve routing decisions (which models work best for which task types)
- Track aggregate cost savings across the network
- Identify performance issues
Every user (free or paid) contributes to making routing smarter for everyone.