Skip to content

fix(telemetry): make telemetry opt-in and off by default - #2

Merged
DevFlex-AI merged 1 commit into
mainfrom
telemetry-opt-in
Aug 6, 2026
Merged

fix(telemetry): make telemetry opt-in and off by default#2
DevFlex-AI merged 1 commit into
mainfrom
telemetry-opt-in

Conversation

@DevFlex-AI

@DevFlex-AI DevFlex-AI commented Aug 6, 2026

Copy link
Copy Markdown

Upstream treats the default "unset" telemetry state as opted in (opt-out semantics), so any build made with a POSTHOG_API_KEY baked in sends usage data keyed to vscode.env.machineId before the user answers the consent banner. This flips the gate to true opt-in in both hosts:

// src/core/webview/webviewMessageHandler.ts (webviewDidLaunch and telemetrySetting cases)
const isOptedIn = telemetrySetting === "enabled" // was: !== "disabled"

// webview-ui/src/utils/TelemetryClient.ts
if (telemetrySetting === "enabled" && apiKey && distinctId) { // was: !== "disabled"

Dismissing the first-run telemetry banner now records an explicit "disabled" instead of silently posting "enabled", the English banner copy is rewritten to describe opt-in, and the stale translated copy is removed from the other 17 locales so they fall back to the accurate English text. PRIVACY.md now states telemetry is off by default.

Note that a keyless build was already inert (posthog-node throws on an empty key and the client registration is wrapped in try/catch), so this change is about policy: even a keyed build now stays silent until the user explicitly opts in. Cloud gateway telemetry paths are untouched per the decision to leave the gateway as-is.

Tests: telemetrySettingsTracking.spec.ts updated to document the new semantics (unset to disabled fires no transition event; unset to enabled fires after enabling), plus a new webview regression test asserting "unset" never initializes PostHog even when an API key and distinct ID are supplied. Ran the touched suites (telemetrySettingsTracking, webviewMessageHandler, webview TelemetryClient/App), tsc for src and webview-ui, and eslint with --prune-suppressions on the edited spec (suppression count did not increase).


View with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is enabled.

@coderabbitai

coderabbitai Bot commented Aug 6, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@DevFlex-AI, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 3 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 22ddcec1-4945-4edf-8498-daa5fc4237ca

📥 Commits

Reviewing files that changed from the base of the PR and between 0354c8d and 8430f77.

📒 Files selected for processing (24)
  • PRIVACY.md
  • src/core/webview/__tests__/telemetrySettingsTracking.spec.ts
  • src/core/webview/webviewMessageHandler.ts
  • webview-ui/src/__tests__/TelemetryClient.spec.ts
  • webview-ui/src/components/common/TelemetryBanner.tsx
  • webview-ui/src/i18n/locales/ca/welcome.json
  • webview-ui/src/i18n/locales/de/welcome.json
  • webview-ui/src/i18n/locales/en/welcome.json
  • webview-ui/src/i18n/locales/es/welcome.json
  • webview-ui/src/i18n/locales/fr/welcome.json
  • webview-ui/src/i18n/locales/hi/welcome.json
  • webview-ui/src/i18n/locales/id/welcome.json
  • webview-ui/src/i18n/locales/it/welcome.json
  • webview-ui/src/i18n/locales/ja/welcome.json
  • webview-ui/src/i18n/locales/ko/welcome.json
  • webview-ui/src/i18n/locales/nl/welcome.json
  • webview-ui/src/i18n/locales/pl/welcome.json
  • webview-ui/src/i18n/locales/pt-BR/welcome.json
  • webview-ui/src/i18n/locales/ru/welcome.json
  • webview-ui/src/i18n/locales/tr/welcome.json
  • webview-ui/src/i18n/locales/vi/welcome.json
  • webview-ui/src/i18n/locales/zh-CN/welcome.json
  • webview-ui/src/i18n/locales/zh-TW/welcome.json
  • webview-ui/src/utils/TelemetryClient.ts

Comment @coderabbitai help to get the list of available commands.

@DevFlex-AI
DevFlex-AI merged commit 5182da1 into main Aug 6, 2026
12 of 16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant