feat: make telemetry opt-out with a one-time notice#40
Conversation
…A-4597) Repoint DEFAULT_TELEMETRY_POST_URL from the stage namespace (53444-aioclitelemetryproxy-stage) to production (53444-aioclitelemetryproxy), now that the prod proxy is deployed and verified. Override via aioTelemetry.postUrl or AIO_TELEMETRY_POST_URL is unchanged.
There was a problem hiding this comment.
🤖 PR Reviewer
This diff replaces the opt-in prompt (using inquirer) with a non-blocking opt-out notice, removes the inquirer dependency, updates the default telemetry URL from stage to production, and fixes the isEnabled() logic. The changes are well-structured, tests are updated to match, and the README is consistent. One minor issue: the notice() function is synchronous but is called with return removed in init.js — that's intentional and fine. No significant problems found.
✅ LGTM! This PR looks good to merge.
💡 How to re-trigger
Comment /review or /pr-reviewer on this PR
| return `${productName} collects anonymous usage data to help us improve our products. ` + | ||
| 'Telemetry is on by default; read what we collect and how it is used here:\n' + | ||
| ` ${privacyPolicyLink || defaultPrivacyPolicyLink}\n` + | ||
| `To opt out, run \`${binName} telemetry off\` (or set AIO_TELEMETRY_DISABLED=true).` |
There was a problem hiding this comment.
this might encourage too many people to opt out ...
What if we just said,
@adobe/aio-cli collects anonymous usage data to help us improve our products.
Telemetry is on by default; read what we collect and how it is used here: <link>
There was a problem hiding this comment.
Agree with that. I changed the notice on e1f0b38.
Drop the explicit 'To opt out, run ...' line from the telemetry notice (per @purplecabbage on PR #40) so it does not over-nudge opt-out; the privacy link already covers how to opt out. Removes the now-unused binName argument from getNoticeMessage/notice.
There was a problem hiding this comment.
🤖 PR Reviewer
The diff cleanly replaces the opt-in prompt flow (inquirer) with a non-blocking opt-out notice, removes the inquirer dependency, updates the default telemetry URL from staging to production, and fixes the isEnabled() check to correctly treat any non-true value as enabled. The changes are well-scoped, tests are updated accordingly, and the logic is straightforward. One minor issue: the notice() function is synchronous but trackEvent() is async — the returned promise is silently dropped, which is intentional per the fire-and-forget design but could mask unexpected errors in the notice path.
✅ LGTM! This PR looks good to merge.
💡 How to re-trigger
Comment /review or /pr-reviewer on this PR
Description
trackEventdebug line now interpolates its values for readability.Related Issue
Motivation and Context
Telemetry was effectively opt-in (a blocking first-run prompt), which under-collects usage data and is inconsistent with how it's described. Moving to opt-out (on by default, with a clear notice and easy
opt-out) is supported by the Adobe Developer Terms of Use §3.3 ("Developer Usage Data") and the General Terms §2.2(D) opt-out framework; our data is anonymous and opt-out remains available.
How Has This Been Tested?
jest --ci— 96 tests passing, 100% coverage;eslintclean.aio-cli, Node 22):aio telemetry --reset→ next command shows the notice once (no prompt), then doesn't reprint.aio telemetry→ reports on by default.aio telemetry off/--no-telemetry/AIO_TELEMETRY_DISABLED=true→ telemetry suppressed (willSend=false).AIO_TELEMETRY_POST_URLto avoid prod during testing).Screenshots (if appropriate):
First-run notice (no prompt):
Types of changes
Checklist: