mirror of
https://github.com/OpenRouterTeam/spawn.git
synced 2026-04-28 03:49:31 +00:00
* fix(telemetry): send events immediately, persistent user ID, session continuity Root cause: events were batched (threshold: 10) but orchestration only fires ~8 funnel events. process.exit() kills the process before beforeExit flushes. Zero real funnel events ever reached PostHog. Fixes: - Send each event immediately via fetch (no batching, no lost events) - Persistent user ID in ~/.config/spawn/.telemetry-id (same across all runs) - Session ID inherited via SPAWN_TELEMETRY_SESSION env var (parent → child) - source: "cli" on every event (filter from website data in PostHog) Removed: _events array, _flushScheduled, flush(), flushSync(), batch logic. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * fix(telemetry): remove process.exit(0) so telemetry fetches complete process.exit(0) was called immediately after main() resolved, aborting any in-flight fire-and-forget telemetry fetches. This silently dropped spawn_deleted, funnel, and lifecycle events. Now the process exits naturally when the event loop drains, giving pending requests time to complete. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Co-authored-by: A <258483684+la14-1@users.noreply.github.com> |
||
|---|---|---|
| .. | ||
| cli | ||
| shared | ||