feat(telemetry): include instance_create_ts in heartbeat payload

Load the instance creation timestamp from data/labels/instance_id.json
(backfilling+persisting it for instances created before the field existed),
expose it as constants.instance_create_ts, and include it in the heartbeat
payload so Space can anchor Time-To-Value / onboarding analytics on real
install time rather than first-heartbeat.

Verified: py_compile, ruff, pytest tests/unit_tests/telemetry/ (37 passed).
This commit is contained in:
RockChinQ
2026-06-13 11:13:18 -04:00
parent 7fe3eedeea
commit b7d8332cb0
4 changed files with 20 additions and 0 deletions
@@ -62,6 +62,7 @@ class TestBuildHeartbeatPayload:
assert payload['event_type'] == 'instance_heartbeat'
assert payload['query_id'] == ''
assert 'instance_create_ts' in payload
assert 'timestamp' in payload
f = payload['features']
assert f['database'] == 'postgresql'