feat(telemetry): carry app_version on instance_started (#681)

app_version was attached only to feedback events; every other allowlist stripped it, so the install base could not be segmented by release. One property on the once-per-boot census event covers it. Fixes #674.
This commit is contained in:
SnapOtter
2026-07-30 09:40:53 +08:00
committed by GitHub
parent fe21f352f6
commit b6c69b7aeb
6 changed files with 15 additions and 3 deletions
+1 -1
View File
@@ -26,7 +26,7 @@ const ALLOWED: Record<string, ReadonlySet<string>> = {
"status",
]),
ai_bundle_action: new Set(["bundle_id", "action", "duration_ms"]),
instance_started: new Set(["arch", "os_platform", "deploy_mode", "gpu_present"]),
instance_started: new Set(["arch", "os_platform", "deploy_mode", "gpu_present", "app_version"]),
auth_login: new Set(["method"]),
auth_login_failed: new Set(["method"]),
};
+2 -1
View File
@@ -1,6 +1,6 @@
import { existsSync } from "node:fs";
import os from "node:os";
import type { InstanceStartedProperties } from "@snapotter/shared";
import { APP_VERSION, type InstanceStartedProperties } from "@snapotter/shared";
import { deployMode } from "./deploy-mode.js";
// Facts about the running instance, shipped once at boot as the
@@ -19,5 +19,6 @@ export function gatherSystemProperties(): InstanceStartedProperties {
os_platform: os.platform(),
deploy_mode: deployMode(),
gpu_present: existsSync("/dev/nvidia0"),
app_version: APP_VERSION,
};
}