Repository navigation
feat(ENG-15367): ship the PostHog project key so released builds send - #585
Open
tigh-latte wants to merge 2 commits into
Open
tigh-latte wants to merge 2 commits into
tigh-latte wants to merge 2 commits into
Conversation
This was referenced Nov 3, 2026
tigh-latte
force-pushed
the
eng-15367-8-project-key
branch
from
November 3, 2026 13:58
44f2ac1 to
fa6ea6a
Compare
tigh-latte
force-pushed
the
eng-15367-7-send-policy
branch
from
November 3, 2026 13:58
73b7d57 to
9720604
Compare
tigh-latte
force-pushed
the
eng-15367-8-project-key
branch
from
November 3, 2026 14:59
fa6ea6a to
eb726c1
Compare
tigh-latte
force-pushed
the
eng-15367-7-send-policy
branch
from
November 3, 2026 14:59
9720604 to
0b1d429
Compare
tigh-latte
force-pushed
the
eng-15367-8-project-key
branch
from
November 4, 2026 10:09
eb726c1 to
26cda54
Compare
tigh-latte
marked this pull request as ready for review
November 4, 2026 10:15
Set POSTHOG_PROJECT_KEY to the write-only key of the dedicated "Cloudsmith CLI" PostHog EU project. Released builds now send one usage event per run, under every rule from the rest of the stack: opt-outs, per-command policies, the first-run notice, non-Cloudsmith hosts, SSL off, CI sampling and the 1 s budget. Development builds still send nothing unless CLOUDSMITH_TELEMETRY_POSTHOG_KEY is set. The key is not a secret (PostHog project keys can only ingest events), so its line carries gitleaks:allow and typos ignores phc_ keys. Unit tests run with the built-in key blanked, so none can send. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The first-run notice now follows Homebrew's: what is collected in one sentence, what is never collected, a link to the docs page "(and how to opt out)", and that nothing was sent. The install ID, the telemetry commands, the opt-outs, log mode and retention are on the docs page. The wording is final. Events carry no person profile, so PostHog cannot delete one install's events on request. The CHANGELOG and the new README Telemetry section say that PostHog deletes events 12 to 13 months after they are sent (the project's retention is 12 months and PostHog cleans up monthly). The CHANGELOG describes what the event contains and what is never sent, the install ID, the first-run notice, the runs that send nothing, the 1 s wait and the opt-outs. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
tigh-latte
force-pushed
the
eng-15367-8-project-key
branch
from
November 4, 2026 11:13
26cda54 to
918e524
Compare
tigh-latte
force-pushed
the
eng-15367-7-send-policy
branch
from
November 4, 2026 11:13
0b1d429 to
9a7b50f
Compare
This branch has not been deployed
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.
Description
This PR ships the PostHog project key, so released builds start sending one
cli command executedevent per run. Everything else in the stack is already in place and sends nothing without a key.core/usage/settings.py:POSTHOG_PROJECT_KEYis the write-only key of the dedicated "Cloudsmith CLI" PostHog EU project (eu.i.posthog.com).# gitleaks:allow, so the secret scanner skips that line only (the same key anywhere else is still flagged), and.typos.tomlignoresphc_keys.conftest.pyblanks the built-in key for every unit test, so no test can send;usage_eventsstill supplies a test key.Behaviour changes
@telemetry.sendpolicies, the first-run notice (the first interactive run sends nothing), non-Cloudsmith API hosts, SSL verification off, CI sampling, the 24 h backoff and the shared 1 s exit budget.CLOUDSMITH_TELEMETRY_POSTHOG_KEYis set.cloudsmith telemetry statuson a released build now sayson (enabled)unless something turns it off.Before merging
$process_person_profile: false; PostHog deletes them 12 to 13 months after they are sent (project retention set to 12 months), and they cannot be deleted on request before then. The README, CHANGELOG and docs page say so.cli command executed(tested), retention 12 months, no destinations or exports.developmentto theproductionenvironment filter.Type of Change
Additional Notes
The project already holds test data (the spike's events and synthetic events used to build the dashboards). All of it is tagged
environment: development, and every product dashboard filters on the environment, so it never mixes with production data.The repo's
betterleaks.tomlis not read by the secret scanner: betterleaks looks for.betterleaks.toml(with a leading dot), so pre-commit and CI use its built-in rules. That is why this PR uses an inlinegitleaks:allowrather than editingbetterleaks.toml. Fixing the file name is a separate change.