From 0fd739ceb88a065a03d4839ae2dd25bfee12448c Mon Sep 17 00:00:00 2001 From: Matthew Slipper Date: Sun, 29 Mar 2026 06:12:08 +0000 Subject: [PATCH 1/4] feat: Add PostHog install telemetry to install.sh Send a lightweight anonymous event to PostHog on successful install, capturing version, OS, and architecture. Uses a random UUID as the distinct ID to avoid collecting any PII. The request runs in the background with a short timeout so it never blocks or breaks the installer. --- install.sh | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/install.sh b/install.sh index 2526f8a..0298543 100755 --- a/install.sh +++ b/install.sh @@ -191,4 +191,23 @@ else warn " export PATH=\"${INSTALL_DIR}:\$PATH\"" fi +# ── telemetry ───────────────────────────────────────────────────────────────── + +# Send a single install event to PostHog. Runs in the background and +# silently ignores failures so it never blocks or breaks the installer. +POSTHOG_API_KEY="phc_yO8qr8j1QKsm60VrzE08lRg8wbEYc1SZTcTTtfaOvH1" +curl -fsS --max-time 5 -o /dev/null \ + -H "Content-Type: application/json" \ + -d "{ + \"api_key\": \"${POSTHOG_API_KEY}\", + \"event\": \"install\", + \"distinct_id\": \"$(cat /proc/sys/kernel/random/uuid 2>/dev/null || uuidgen 2>/dev/null || echo anonymous)\", + \"properties\": { + \"version\": \"${VERSION}\", + \"os\": \"${OS_NAME}\", + \"arch\": \"${ARCH_NAME}\" + } + }" \ + "https://us.i.posthog.com/capture/" >/dev/null 2>&1 & + printf "\n Happy sandboxing! 🏖️\n\n" From 37351d147c949469ffd757acd0e2cf3a823ca271 Mon Sep 17 00:00:00 2001 From: Matthew Slipper Date: Sun, 29 Mar 2026 06:13:35 +0000 Subject: [PATCH 2/4] fix: Run telemetry curl in subshell so it survives script exit Wrapping in ( ... &) detaches the background process from the parent shell, preventing it from being killed when the script exits. Uses a subshell instead of disown for POSIX sh compatibility. --- install.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/install.sh b/install.sh index 0298543..15cebcc 100755 --- a/install.sh +++ b/install.sh @@ -196,7 +196,7 @@ fi # Send a single install event to PostHog. Runs in the background and # silently ignores failures so it never blocks or breaks the installer. POSTHOG_API_KEY="phc_yO8qr8j1QKsm60VrzE08lRg8wbEYc1SZTcTTtfaOvH1" -curl -fsS --max-time 5 -o /dev/null \ +(curl -fsS --max-time 5 -o /dev/null \ -H "Content-Type: application/json" \ -d "{ \"api_key\": \"${POSTHOG_API_KEY}\", @@ -208,6 +208,6 @@ curl -fsS --max-time 5 -o /dev/null \ \"arch\": \"${ARCH_NAME}\" } }" \ - "https://us.i.posthog.com/capture/" >/dev/null 2>&1 & + "https://us.i.posthog.com/capture/" >/dev/null 2>&1 &) printf "\n Happy sandboxing! 🏖️\n\n" From 46c54f0a38334468cf1c93334eedd583b57f9451 Mon Sep 17 00:00:00 2001 From: Matthew Slipper Date: Sun, 29 Mar 2026 06:14:17 +0000 Subject: [PATCH 3/4] fix: Rename telemetry event to irons_installed --- install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install.sh b/install.sh index 15cebcc..865e50d 100755 --- a/install.sh +++ b/install.sh @@ -200,7 +200,7 @@ POSTHOG_API_KEY="phc_yO8qr8j1QKsm60VrzE08lRg8wbEYc1SZTcTTtfaOvH1" -H "Content-Type: application/json" \ -d "{ \"api_key\": \"${POSTHOG_API_KEY}\", - \"event\": \"install\", + \"event\": \"irons_installed\", \"distinct_id\": \"$(cat /proc/sys/kernel/random/uuid 2>/dev/null || uuidgen 2>/dev/null || echo anonymous)\", \"properties\": { \"version\": \"${VERSION}\", From 88b0e479704e3567a729b1c93179729e7e1a4871 Mon Sep 17 00:00:00 2001 From: Matthew Slipper Date: Sun, 29 Mar 2026 06:14:49 +0000 Subject: [PATCH 4/4] fix: Use correct PostHog event ingestion endpoint --- install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install.sh b/install.sh index 865e50d..a73fc6c 100755 --- a/install.sh +++ b/install.sh @@ -208,6 +208,6 @@ POSTHOG_API_KEY="phc_yO8qr8j1QKsm60VrzE08lRg8wbEYc1SZTcTTtfaOvH1" \"arch\": \"${ARCH_NAME}\" } }" \ - "https://us.i.posthog.com/capture/" >/dev/null 2>&1 &) + "https://us.i.posthog.com/i/v0/e/" >/dev/null 2>&1 &) printf "\n Happy sandboxing! 🏖️\n\n"