Skip to content

feat: add telemetry preference controls and preinstall notice#418

Draft
jesseturner21 wants to merge 1 commit intoaws:mainfrom
jesseturner21:feat/telemetry-controls
Draft

feat: add telemetry preference controls and preinstall notice#418
jesseturner21 wants to merge 1 commit intoaws:mainfrom
jesseturner21:feat/telemetry-controls

Conversation

@jesseturner21
Copy link
Contributor

@jesseturner21 jesseturner21 commented Feb 24, 2026

CLI #418

Telemetry Preference Controls

The AgentCore CLI uses the CDK for resource deployment and management tasks, enabling seamless transition to IaC-based management of agents. As part of that integration, the CLI inherits CDK CLI as a dependency, which includes CDK's telemetry behavior.
This PR introduces two things: opt-out controls for telemetry, and a telemetry spec that defines what will be collected in a future release.

Opt-out controls

This PR delivers preference controls only. No data is collected until a future release. Every existing user and CI pipeline will have the opt-out mechanism available before any telemetry is ever sent.
Controls included in this PR:

  • agentcore telemetry disable
  • agentcore telemetry enable
  • agentcore telemetry status
  • Environment variable support: AGENTCORE_TELEMETRY_DISABLED=true or DO_NOT_TRACK=true

Preferences are stored in ~/.agentcore/config.json and resolved in this order: env vars > config file > default (enabled).

Telemetry spec

When data collection ships in a future release, the AgentCore CLI will collect only aggregated, anonymous usage analytics. The spec explicitly excludes account IDs, region, resource names, error payloads, and any data that could be associated with a specific user, account, or organization. A local inspection capability will also be included so users can verify exactly what is being sent.


Message at npm install or update time

The AgentCore CLI collects aggregated, anonymous usage analytics to help
improve the tool. To opt out, run:

    agentcore telemetry disable

Or set the environment variable: AGENTCORE_TELEMETRY_DISABLED=true

Description

Add user-facing telemetry preference controls (This PR is controls only, no data collection) to the AgentCore CLI. This establishes the opt-out mechanism and install-time notice so users are informed and in control before telemetry collection is enabled in a future release of the CLI.

What's included:

  • New agentcore telemetry command with enable, disable, and status subcommands
  • Telemetry notice added to the preinstall script, shown at install and upgrade time
  • Support for AGENTCORE_TELEMETRY_DISABLED and DO_NOT_TRACK environment variables
  • Global config module (~/.agentcore/config.json) for persisting user preferences
  • Preference resolution with priority: env vars > config file > default (enabled)
  • Refactored update-notifier.ts to reuse the shared GLOBAL_CONFIG_DIR constant

Our plans have been informed by the following CDK discussions:

@jesseturner21 jesseturner21 requested a review from a team February 24, 2026 16:01
@github-actions github-actions bot added size/l PR size: L size/m PR size: M and removed size/l PR size: L labels Feb 24, 2026
@jesseturner21 jesseturner21 force-pushed the feat/telemetry-controls branch from 5184052 to 4c2421f Compare February 24, 2026 23:27
@github-actions github-actions bot added size/m PR size: M and removed size/m PR size: M labels Feb 24, 2026
Add user-facing telemetry controls (opt-out command, env var support,
config file, preinstall notice) without collecting any data. This
establishes the user-facing messaging before launch.

- Add `agentcore telemetry` command with enable/disable/status subcommands
- Add telemetry notice as a warning in preinstall script (shown on install/upgrade)
- Support AGENTCORE_TELEMETRY_DISABLED and DO_NOT_TRACK env vars
- Add global config module (~/.agentcore/config.json) for persisting preferences
- Refactor update-notifier to reuse shared GLOBAL_CONFIG_DIR constant
- Add unit tests for global config, preference resolution, and command actions
@jesseturner21 jesseturner21 force-pushed the feat/telemetry-controls branch from 4c2421f to 402275b Compare February 24, 2026 23:30
@github-actions github-actions bot added size/m PR size: M and removed size/m PR size: M labels Feb 24, 2026
@jesseturner21 jesseturner21 self-assigned this Feb 24, 2026
@jesseturner21 jesseturner21 changed the title feat: add telemetry preference controls and first-run notice feat: add telemetry preference controls and preinstall notice Feb 24, 2026
@vivdalal vivdalal requested a review from awsarron February 25, 2026 00:02
@jesseturner21 jesseturner21 marked this pull request as draft February 25, 2026 15:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/m PR size: M

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant