Repository navigation
feat(cli): add opt-in anonymous PostHog EU telemetry - #6
Merged
Merged
Conversation
7 tasks done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds anonymous CLI telemetry with explicit consent. The first eligible interactive command asks once, defaults to no, and saves that choice.
uptide telemetry on|off|status|showmanages the preference and lets users inspect the last sanitized event.UPTIDE_TELEMETRY=0always disables collection; CI requiresUPTIDE_TELEMETRY=1even when local consent is saved.Privacy and delivery
$ip: null,$geoip_disable: trueand$process_person_profile: false.Release configuration
Both manual release workflows now read the write-only capture key from the
UPTIDE_TELEMETRY_BUILD_KEYrepository secret and embed the EU host. No real key is committed; builds without a key send nothing.UPTIDE_TELEMETRY_HOSToverrides the HTTPS origin for testing.Before setting the release secret, the project owner must enable Discard client IP data and arrange/verify automatic deletion after 90 days in PostHog EU. The CLI cannot enforce server retention, and this PR does not configure the remote project.
docs/telemetry.mddocuments the exact fields, controls, local storage and deployment requirements.Validation
pnpm lint,pnpm typecheck,pnpm test: passed.pnpm smoke 22: all assertions passed in Docker across npm, npm workspaces, pnpm, Yarn classic and Yarn Berry; includes telemetry controls with forced opt-out.pnpm public:check: clean with the external denylist loaded only into the command environment.These timings demonstrate that foreground completion does not wait for the sender's network deadline; they are a local smoke measurement, not a general performance guarantee.