Skip to main content

Module telemetry_send

Module telemetry_send 

Source
Expand description

Sending the telemetry-v2 daily totals: on MCP exit, on tool-call ticks and from the daemon’s hourly loop, with the local send ledger.

Constants§

EXIT_TELEMETRY_TIMEOUT
Network budget for the send that runs as the MCP server exits.

Functions§

send_telemetry
Send the cumulative telemetry totals if the aggregate admits a send now. Returns the acknowledged bucket. Admission (daily cap, spacing, “nothing new”) is decided under the aggregate lock, so callers may call freely.
spawn_daemon_telemetry
Spawn the daemon’s telemetry loop (must run inside a Tokio runtime).
telemetry_send_eligible
Whether this process may collect and send telemetry right now. Fails closed: an unreadable config never counts as consent.