Repository navigation
Closed
Labels
complexity-mediumComplexity: medium (board points 5-8)priority-p2Importanttheme-infrastructureTheme: Infrastructuretype-featureNew functionality
Description
Summary
Add an opt-out telemetry heartbeat that periodically reports aggregate usage metrics from Trinity installations back to an Ability-controlled endpoint. This gives us visibility into feature adoption, version distribution, and platform diversity across the self-hosted fleet — without collecting any user content or PII.
Design
What to report (no PII, aggregates only)
| Field | Description |
|---|---|
installation_id |
Random UUID generated at first boot, persisted in system_settings. Not tied to any user. |
trinity_version |
From package/build metadata |
platform |
OS, Docker version, CPU arch |
agent_count |
Total agents, currently running |
features_enabled |
Boolean flags: Slack, Telegram, WhatsApp, Nevermined, voice, git-sync, canary |
schedule_execution_count_7d |
Aggregate executions last 7 days |
active_users_7d |
Count of distinct user IDs with activity (no emails/names) |
uptime_days |
Days since first boot |
reported_at |
ISO 8601 UTC timestamp |
Transport
POST https://telemetry.ability.ai/v1/ping(HTTPS, JSON body)- Daily heartbeat via APScheduler at a jittered time (avoids thundering herd across fleet)
- Fire-and-forget: failure is silently swallowed, never surfaced to users
Opt-out
- Single escape hatch:
TELEMETRY_ENABLED=falseenv var — fully suppresses all reporting - On by default; no admin UI toggle (keeps the surface area minimal and the data coverage high)
- Must be documented clearly in
.env.exampleand deployment docs
Backend components
services/telemetry_service.py — collect snapshot, POST to endpoint
db/system_settings.py — add installation_id field
main.py — register APScheduler daily job
config.py — read TELEMETRY_ENABLED (default True)
Receiving server
Separate ops work (not in this issue). Needs a simple ingestion endpoint at telemetry.ability.ai that writes to a time-series store (ClickHouse or BigQuery).
Acceptance Criteria
-
installation_idis generated once at first boot and persisted; never regenerates - Daily heartbeat fires (jittered ±2h around midnight UTC) and POSTs the payload
-
TELEMETRY_ENABLED=falseenv var fully suppresses all reporting; any other value (or absent) means enabled - Payload contains no email addresses, agent names, message content, or IP addresses
- Network failure is silently ignored — no error surfaced to UI or logs (debug level only)
-
.env.exampledocumentsTELEMETRY_ENABLED=falsewith a comment explaining what is collected
Technical Notes
installation_idshould live insystem_settings(existing table), not a new table- Use
httpxasync client with a short timeout (5s) — already a dependency - The existing
_notify.pyResend key is a separate concern and should be moved to an env var in a follow-up; don't conflate with this issue - Jitter the daily fire time so coordinated deployments don't spike simultaneously at midnight
Metadata
Metadata
Assignees
Labels
complexity-mediumComplexity: medium (board points 5-8)priority-p2Importanttheme-infrastructureTheme: Infrastructuretype-featureNew functionality
Activity
vybe commentedon Jul 3, 2026
Readiness triage 2026-07-03: duplicate of trinity-enterprise#12 (anonymous opt-in usage telemetry via hosted intake), which is the newer framing and lives in the correct tracker for feature work. First-run operator intake shipped separately (trinity-enterprise#38).