Repository navigation
refactor(ENG-15367): share telemetry opt-outs and the exit wait budget - #568
Draft
tigh-latte wants to merge 1 commit into
Draft
tigh-latte wants to merge 1 commit into
tigh-latte wants to merge 1 commit into
Conversation
Move the opt-out checks, build environment detection and the Cloudsmith host check out of the Sentry module into core/telemetry_common.py, so error reporting and usage telemetry follow the same rules. The update check now draws its end-of-run wait from a shared 1 second budget, so all background work together never delays a command's exit by more than 1 second. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Oct 29, 2026
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 stack adds pseudonymous usage telemetry to the CLI. Each run sends one
cli command executedevent to PostHog, so we can see which commands, flags and setups are actually used before we change or remove them. The code ships without a project key. A build only sends when a developer points it at a test project.This first PR only moves shared code. The opt-out checks, build environment detection and the Cloudsmith host check move out of the Sentry module into
core/telemetry_common.py, so error reporting and usage telemetry follow one set of rules.Behaviour changes
telemetry = falsenow also reads the file named byCLOUDSMITH_CONFIG_FILE, like the rest of the CLI. Before,telemetry = falsein that file did not turn Sentry off.Sentry and PostHog once the full stack is in
DO_NOT_TRACK,CLOUDSMITH_NO_TELEMETRY,telemetry = falsemcp start,telemetry, shell completion, non-Cloudsmith API hosts, SSL verification off, development builds without a test keyThe stack
cloudsmith telemetry status / id / resetType of Change
Additional Notes
N/A: nothing calls the moved helpers in a new way until #569 onwards.
🤖 Generated with Claude Code