From 53c53e8df4836e715d76018cf2240a12bf1f498d Mon Sep 17 00:00:00 2001 From: James Murdza Date: Mon, 11 Aug 2025 08:29:13 -0400 Subject: [PATCH] Add check for legacy environment variable --- libs/python/core/core/telemetry/telemetry.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libs/python/core/core/telemetry/telemetry.py b/libs/python/core/core/telemetry/telemetry.py index c04423f8..c92f49b8 100644 --- a/libs/python/core/core/telemetry/telemetry.py +++ b/libs/python/core/core/telemetry/telemetry.py @@ -60,6 +60,9 @@ def is_telemetry_globally_disabled() -> bool: Returns: bool: True if telemetry is globally disabled, False otherwise """ + # Check legacy environment variable for telemetry opt-out + if os.environ.get("CUA_TELEMETRY", "").lower() == "off": + return True # Only check for CUA_TELEMETRY_ENABLED - telemetry is enabled only if explicitly set to a truthy value telemetry_enabled = os.environ.get("CUA_TELEMETRY_ENABLED", "true").lower() return telemetry_enabled not in ("1", "true", "yes", "on")