Repository navigation
fix(cli): Opt out of telemetry for any truthy DO_NOT_TRACK or SENTRY_CLI_NO_TELEMETRY - #2932
Open
sentry-junior[bot] wants to merge 4 commits into
Open
sentry-junior[bot] wants to merge 4 commits into
sentry-junior[bot] wants to merge 4 commits into
Conversation
…CLI_NO_TELEMETRY Both variables opted out only for the exact value `1`, so `DO_NOT_TRACK=true` still sent telemetry. They now opt out for any value except an empty or false-like one (`0`, `false`, `no`, `off`), read by a shared `isEnvFlagSet()` that the wizard's `SENTRY_SPOTLIGHT` check already used inline. A false-like value doesn't opt in: the next source in the precedence still decides. Co-Authored-By: BYK <126780+BYK@users.noreply.github.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
1 Skipped Deployment
|
Use `envToBool` from `@sentry/core` for SENTRY_CLI_NO_TELEMETRY and DO_NOT_TRACK instead of a new `isEnvFlagSet()` helper. In loose mode it already returns false for empty and false-like values and true for any other value, which is the opt-out rule. Drops the helper and the wizard change that came with it. Co-Authored-By: BYK <126780+BYK@users.noreply.github.com>
…tallers `install` and `install.ps1` skipped their error reports only for SENTRY_CLI_NO_TELEMETRY=1 and ignored DO_NOT_TRACK. Both now skip them when either variable holds any value except an empty or false-like one (0, false, f, n, no, off, any case), the same values the CLI reads. Co-Authored-By: BYK <126780+BYK@users.noreply.github.com>
`Array#includes` on the recorded URLs read to CodeQL as a URL substring check. Compare each URL with `===` instead; the test checks the same thing.
This branch was successfully 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.
SENTRY_CLI_NO_TELEMETRYandDO_NOT_TRACKonly opted out when set to exactly1. The installers also ignoredDO_NOT_TRACK.1true,TRUE,yes,on, any other non-empty value0,false,no,off,f,n(any case), emptyThe CLI now reads both variables with
envToBoolfrom@sentry/core, the helper the SDKs use, instead of a new parser. In its default (loose) mode it returnsfalsefor empty and false-like values andtruefor anything else, which is the opt-out rule. Two details come from that helper:fandnalso count as false, and values are not trimmed, so" 0 "opts out.Precedence stays the same:
SENTRY_CLI_NO_TELEMETRY, thenDO_NOT_TRACK, thensentry cli defaults telemetry, then on by default.A false-like value such as
SENTRY_CLI_NO_TELEMETRY=0doesn't opt in. It only doesn't opt out, soDO_NOT_TRACK, the saved preference, or the default still decides. Forcing telemetry on from an env var would override a user's explicitsentry cli defaults telemetry off.The
sentry mcp/@sentry/mcp-serverstdio server already decides throughisTelemetryEnabled(), so it gets the fix with no separate change.The shell installer (
install) andinstall.ps1now skip their error reports for the same values of either variable. Each has a small check with the same false-like set (env_flag_setin POSIXcasepatterns,Test-EnvFlagin PowerShell), since they can't use the CLI's code.Also updated the env-registry descriptions, the installer help text, the getting-started, configuration and migration docs, and
TELEMETRY.md.via @BYK.
--
View Session [Sentry]