feat(telemetry): anonymous opt-out usage telemetry via PostHog (5.9.0) - #93
Closed
abhishekmishragithub wants to merge 1 commit into
Closed
feat(telemetry): anonymous opt-out usage telemetry via PostHog (5.9.0)#93abhishekmishragithub wants to merge 1 commit into
abhishekmishragithub wants to merge 1 commit into
Conversation
Add smallestai.telemetry: fire-and-forget anonymous product telemetry to help improve the SDK. Privacy-first by design. - No PII or secrets: only event name + SDK/Python/OS version + a random anonymous install id. Geography is derived server-side by PostHog from the request IP. - On by default (industry norm), opt out with SMALLESTAI_TELEMETRY=0 or DO_NOT_TRACK=1; one-time notice on first run. Disclosed in the README. - Sent over httpx to PostHog's /capture/ (no new dependency; phc_ key is write-only). Runs on a daemon thread, never blocks, never raises. - Wired into the CLI entry (coarse command group only). Richer events (deploy outcome, errors) to follow once the other CLI PRs land. Version 5.9.0.
This was referenced Aug 6, 2026
Collaborator
Author
|
Superseded by the consolidated release PR release/5.10.0 (single review + single version bump). Branch kept. |
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.
What
smallestai.telemetry: fire-and-forget anonymous, opt-out product telemetry so we can see what to improve. Sends to the existing PostHog project.Privacy (by design)
SMALLESTAI_TELEMETRY=0orDO_NOT_TRACK=1; one-time notice on first run; disclosed in the README.Why PostHog over OTel / a custom endpoint
Product telemetry (installs, feature usage, funnels, geo) is PostHog's job; OTel is for distributed tracing (heavier, wrong shape). Sends over
httpx(already a dep) to/capture/with the write-onlyphc_key, so no new dependency and no backend ingest to build.Wiring
cli_invokedevent (command group only, e.g.agent-crew).crew_deploysuccess/fail,agent_created, errors) are a fast follow once feat(integrations): optional pipecat + livekit adapters (5.6.0) #90/feat(cli): surface crew-vs-platform config ownership (init + doctor) [5.7.0] #91 land, to avoid CLI merge conflicts.Checks
pytest tests/custom/test_telemetry.py— 5 passed (opt-out, anonymous id, no-secret payload, once-only notice).mypy src/smallestai/telemetry.py— clean. CLI still runs./capture/accepts our event (see PR checks / smoke).Draft — merging bumps 5.9.0 and auto-publishes. Hold for your review. Version assumes #90/#91/#92 merge first.