Telemetry

RelayPlane collects anonymous usage data to improve routing decisions. Here's exactly what we collect and how to opt out.

Telemetry is on by default. We collect anonymous metadata: task type, model, token counts, latency, cost. Your prompts and responses are never collected. They go directly to LLM providers. To disable: relayplane telemetry off

What 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.02
10}
FieldDescription
device_idRandom anonymous ID (not fingerprintable)
task_typeInferred from token patterns, NOT prompt content
modelWhich model handled the request
tokens_in/outToken counts (not content)
latency_msRequest latency
successWhether the request succeeded
cost_usdEstimated cost
timestampISO 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 output
  • generation, High output/input ratio
  • classification, Low output/input ratio
  • long_context, Input > 10,000 tokens
  • content_generation, Output > 1,000 tokens
  • tool_use, Request includes tool calls
  • general, 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=24h
3
4# Cost rows grouped by agent (last 7d), labels resolved from local agent registry
5curl http://localhost:4100/v1/telemetry/breakdown?dimension=agent&window=7d

Windows: 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 sent
2relayplane --audit
3
4# Run fully offline (no telemetry at all)
5relayplane --offline

Opt Out

1# Disable telemetry
2relayplane telemetry off
3
4# Check status
5relayplane telemetry status
6
7# Re-enable
8relayplane telemetry on

Live 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.41
9 },
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.

Open Source: You can inspect the telemetry code yourself at github.com/RelayPlane/proxy