diff --git a/packages/cli/src/global_telemetry.ts b/packages/cli/src/global_telemetry.ts index c047d81afd..34310c5510 100644 --- a/packages/cli/src/global_telemetry.ts +++ b/packages/cli/src/global_telemetry.ts @@ -13,6 +13,7 @@ const {version} = require('../package.json') const root = path.resolve(__dirname, '../package.json') const isDev = process.env.IS_DEV_ENVIRONMENT === 'true' +const isTelemetryDisabled = process.env.DISABLE_TELEMETRY === 'true' function getToken() { const config = new Config({root}) @@ -152,6 +153,10 @@ export function reportCmdNotFound(config: any) { export async function sendTelemetry(currentTelemetry: any, rollbarCb?: () => void) { // send telemetry to honeycomb and rollbar + if (isTelemetryDisabled) { + return + } + const telemetry = currentTelemetry if (telemetry instanceof Error) {