mirror of
https://github.com/VibedByKaKi/t3-code-android-nightly.git
synced 2026-11-28 16:43:28 +01:00
3.1 KiB
3.1 KiB
Product analytics
The server owns analytics delivery, opt-out, and identity for every connected client. Clients never load an analytics browser SDK, and visiting hosted web without an authenticated connection does not count as product use.
Identity
distinct_idis the install id. Both are the hash of a random id persisted in the state directory. Events carry it under both names because older builds deriveddistinct_idfrom the Codex or Claude sign-in files, so the ingest side counts installs byinstallId.- Identity never comes from a provider. Do not read a provider's sign-in files or derive an id or owner from a user's OpenAI, Claude, or other provider account, even hashed: users did not sign in to those to be identified by T3 Code.
- Resolve owners at query time.
install.owner_observedlinks installs to owners (Connect account, client device). Two Connect accounts are never merged as one person. - Hash everywhere with one helper. Clients and servers hash with the same SHA-256 helper so IDs correlate; the server accepts only hashes from clients.
Attribution boundaries
- Client dimensions (
surface, etc.) belong to the event's WebSocket connection, never a server-global "current client". Keep client and server dimensions separate, and leave missing client metadata unknown rather than backfilling from server properties. - Active-use reports count
client.turn.requested(deduplicated by command ID), not connections (T3 Connect sessions renew hourly).
Collection boundary and delivery
- Payloads stay strictly to product metadata, closed contract enums, and normalized measurements:
never attach prompts, file paths, credentials, raw provider payloads, device names, conversation
IDs, or user-named provider instance IDs. Models in the bundled manifest or a vendor's own
model list report their catalog slug, with aliases and routed IDs mapped to it. Any other model
ID can name a user, a deployment, or a local file, so it reports only
custom:<driver>. - The sole exception is opt-in
agent.feedback, whichFeedbackServicescrubs of paths, private values, and secret-shaped strings, and only attaches bounded conversation traces when the user explicitly previews and sends them. Each report is sent under its own id withoutinstallIdor host properties, in a request of its own, so it links to no install or other report; reports sent without a preview carry only their categories. - Delivery (
AnalyticsService.ts) attaches a UUID per event, backs off on failure, and drops batches after bounded retries so a stuck batch cannot loop forever. - Dev-runner servers and servers on CI runners disable telemetry (and relay tracing) by default so
they do not inflate install counts. CI detection is
isCiEnvironmentinotelEnvironment.ts. An explicitT3CODE_TELEMETRY_ENABLED=trueoverrides both defaults; a managed policy that denies telemetry overrides everything.