Skip to content

feat(cli): add --no-telemetry flag and NO_TELEMETRY opt-out - #1814

Open
cuhawk wants to merge 1 commit into
cloudflare:masterfrom
cuhawk:feat/no-telemetry-flag-1298
Open

cuhawk wants to merge 1 commit into
cloudflare:masterfrom
cuhawk:feat/no-telemetry-flag-1298

Conversation

@cuhawk

@cuhawk cuhawk commented Dec 2, 2026

Copy link
Copy Markdown

Closes #1298.

Summary

  • Add a global --no-telemetry\ boolean flag (and \NO_TELEMETRY\ environment variable fallback) configured via \�pp.Before.
  • Route tunnel, Access, and updater Sentry initialization/capture paths through \cmd/cloudflared/telemetry\ so setting --no-telemetry\ or \NO_TELEMETRY=true\ skips initializing Sentry and suppresses updater Sentry events while keeping default behavior unchanged when unset.
  • Preserve empty-invocation tunnel/service detection when --no-telemetry\ is the only flag set.
  • Document --no-telemetry\ / \NO_TELEMETRY\ usage in \README.md\ and add unit tests covering CLI/env precedence, Sentry init gating, updater suppression, and concurrent access.

Verification

  • \gofmt -l\ clean on all modified/added Go files
  • \go test -v ./cmd/cloudflared ./cmd/cloudflared/telemetry ./cmd/cloudflared/updater ./cmd/cloudflared/access ./cmd/cloudflared/tunnel\ passed in Linux container (Go 1.27.4)

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.

💡An option to disable external telemetry

1 participant