crates/turborepo-telemetry/README.md
Handles anonymous telemetry for Turborepo, sending usage events to the Vercel API in the background with buffering and batching.
┌─────────────────────────────────────────┐
│ Worker (tokio) │
│ │
┌──────────────┐ unbounded │ ┌────────┐ ┌───────────────┐ │
│ telem(event) │ ──────────────────►│ │ Buffer │ ──────► │ TelemetryAPI │ │
└──────────────┘ mpsc channel │ └────────┘ └───────────────┘ │
│ │
│ Flush triggers: │
│ - Buffer hits 10 events │
│ - 1 second timeout │
│ - Shutdown signal │
└─────────────────────────────────────────┘
Key components:
telem() - Global function to send events. Safe to call from anywhere.Worker - Background tokio task that buffers events and flushes them in batches.TelemetryConfig - Persisted config at ~/.config/turborepo/telemetry.json containing enabled state, anonymous ID, and private salt.Event types (events/): CommandEvent, RepoEvent, TaskEvent, GenericEvent
turbo telemetry disableTURBO_TELEMETRY_DISABLED=1DO_NOT_TRACK=1packages/turbo-telemetry/src/config.ts.See https://turborepo.dev/docs/telemetry for full documentation.