Skip to main content

Telemetry Schema

This is the authoritative wire contract between the Lowkey installer (install.sh, with the telemetry client inlined) and any telemetry backend that ingests its events. It is versioned, stable, and backwards-compatible within a major version.
Telemetry is opt-out by default via LOWKEY_TELEMETRY=0 or DO_NOT_TRACK=1. Test installs (--test mode) are flagged with is_test: true so backends can exclude them from product metrics. See Telemetry Privacy for a plain-English version.

Transport

Envelopes

The installer sends two envelope types on three paths:

lowkey.install.v1 — Install Beacon

Sent to POST /v1/install. One envelope per outcome transition (started, completed, failed). This is the primary record for install funnel analytics.

Example

Fields

Outcome lifecycle


lowkey.telemetry.v1 — Event Batch

Sent to POST /v1/ingest. Exactly once per install run, at the end. Contains all fine-grained events that were queued locally during the run.

Example

Envelope fields

Event shape


Allowed event names

Backends MUST reject events whose name is not on this allowlist. This prevents runaway cardinality and keeps cost/dashboards predictable.

Install funnel (emitted by install.sh)

Runtime (reserved — not yet emitted by installer)

The following names are pre-registered so the agent runtime and extensions can emit them without a schema bump: first_run, session.started, session.ended, heartbeat.daily, command.used, feature.used, model.invoked, error.reported, crash.reported, update.available, update.applied, update.skipped, auth.started, auth.completed, auth.failed, onboarding.completed. Event names are closed (allowlist). Event props are open — backends should tolerate unknown keys and drop values that exceed length caps.

/v1/config — Remote Kill-Switch

GET https://telemetry.loki.run/v1/config returns a JSON config that the installer may consult to throttle or disable itself. Missing/unreachable config is treated as “defaults”.

Response

Response headers: Cache-Control: public, max-age=60.

Data-retention & privacy contract

Backends implementing this schema MUST:

Reference backend (DynamoDB)

A minimal compliant backend needs: Table lowkey-install-events (beacon persistence)
  • Partition key: id (string, UUIDv4 assigned by backend)
  • Sort key: timestamp (string, ISO-8601)
  • Attributes: all fields from lowkey.install.v1 + country, source: "v1_install"
  • TTL attribute: ttl (epoch seconds, +365d)
Table lowkey-telemetry-events (per-event persistence)
  • Partition key: id (string, UUIDv4)
  • Sort key: timestamp (string, ISO-8601)
  • GSI by-name on (name, timestamp) — for per-event-name dashboards
  • GSI by-machine on (machine_id, timestamp) — for per-machine queries
  • TTL attribute: ttl (epoch seconds, +90d)

Backward-compatibility rules

  • schema version is in the envelope; any breaking change bumps the suffix (v1v2).
  • Within v1, backends MAY add new optional fields; clients MUST ignore unknown fields.
  • Adding a new event name requires updating the allowlist in both the installer and backend.
  • Removing a field within v1 is forbidden.
  • Renaming a field is forbidden (emit both for one major version).

Versioning