Files
horizon-airdef/crates/horizon-telemetry/Cargo.toml
T
Ludovic Marie 43138159b2 Opt-in data collection (1/5): consent, payloads, outbox and a gated uploader
horizon-telemetry, shared by the launcher, the game and the ingest server:
- consent.json in the game folder: four switches, all off until the player
  answers, a consent version that re-asks when what is collected changes, the
  answer's time, and a random install ID made at the first yes.
- Payloads: perf summaries (percentiles + 14 frame-time buckets from a
  fixed-size Timings recorder), crash and bug reports, and benchmark reports
  carried as docs/benchmark-report.md defines them; size caps per kind.
- A scrubber for user folders, user names, e-mail and IP addresses, UUIDs and
  caller-known private terms.
- The outbox: only allowed kinds get in, daily caps, 200 items / 2 MiB.
- zstd batches with bounded decoding; the uploader re-reads the consent and
  drops withdrawn items before connecting, backs off and caps batches a day.
- tests/consent_gating.rs: a local mock server sees zero connections with the
  consent missing, outdated or withdrawn.

No server is set (DEFAULT_ENDPOINT is None): nothing is sent yet.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 02:21:13 +02:00

29 lines
789 B
TOML

[package]
name = "horizon-telemetry"
version = "0.1.0"
edition.workspace = true
license.workspace = true
rust-version = "1.90"
description = "Opt-in data collection: the player's consent, the payloads, the local outbox and its upload"
[dependencies]
serde = { version = "1", features = ["derive"] }
serde_json = "1"
# zstd in pure Rust: batches are compressed before they leave and checked when they arrive.
ruzstd = "0.9"
# The random install ID and outbox file names.
getrandom = "0.3"
# Sending, for the launcher; the ingest server builds without it.
ureq = { version = "2", default-features = false, features = ["tls"], optional = true }
[features]
default = ["upload"]
upload = ["dep:ureq"]
[[test]]
name = "consent_gating"
required-features = ["upload"]
[lints]
workspace = true