Files
26d60298f8 [OPEND-4220] fix(telemetry): hold first-session stability events until the installation id exists (#8991)
* fix(telemetry): hold first-session stability events until the installation id exists

OPEND-4220 retest 2: on a fresh install the earliest stability events still
left under non-installation identities - a navigation's `started` phase under
the renderer's anonymous id, and early memory samples under the daemon's
synthetic daemon-anon id - splitting one first session across device ids.

Renderer: while bootstrap has no installation id and telemetry is not opted
out, safety events other than exceptions are held and released under the
installation id once setIdentity arrives (60s fallback releases them under the
bootstrap id). A later re-bridge from posthog init keeps the hold.

Daemon: every stability metric except process exits, including the daemon's
own memory samples, storage snapshots and health summaries, goes through the
identity-gated queue. Explicit opt-out or unreadable consent delivers
immediately because no id will appear.

* fix(telemetry): deliver stability metrics when the app config cannot be read

An unreadable app config made the identity gate throw into 'pending', so
metrics were held and eventually dropped instead of being delivered through
captureSafety's fallback identity. Treat a config read failure as 'none'.

---------

Co-authored-by: heggria <bshengtao@gmail.com>
2026-10-26 02:57:10 +00:00
..