8f738d35ec
The game sends an anonymous ping once a minute while it runs (a random session ID kept only in memory, the version, the platform, whether a LAN or friends world is open). The telemetry server counts sessions seen in the last 2 minutes, in memory only, with its own per-address rate limit and a session cap, and serves rounded counts at GET /v1/live. The launcher shows "N playing now" on the Play page when the count is reachable, and tells players what the ping holds on the first-run question, in Settings, and once on the Play page for players who answered before. docs/telemetry.md and the privacy page say the same. Like the rest of telemetry, nothing is sent until HORIZON_TELEMETRY_URL is set or DEFAULT_ENDPOINT gets a server. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
31 lines
946 B
TOML
31 lines
946 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 (and the game's "I'm playing" ping); the ingest server builds without it.
|
|
ureq = { version = "2", default-features = false, features = ["tls"], optional = true }
|
|
|
|
[features]
|
|
default = ["upload", "live"]
|
|
upload = ["dep:ureq"]
|
|
# The "I'm playing" ping and reading the live count (`live`), for the game and the launcher.
|
|
live = ["dep:ureq"]
|
|
|
|
[[test]]
|
|
name = "consent_gating"
|
|
required-features = ["upload"]
|
|
|
|
[lints]
|
|
workspace = true
|