diff --git a/CHANGELOG.md b/CHANGELOG.md index 110ecf25..12eb66de 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,9 @@ Status of the `main` branch. Changes prior to the next official version change will appear here. +* General: + - Support environment variable `SERENA_USAGE_REPORTING` (set to `false` to disable usage reporting) + # 1.1.1 * General: diff --git a/docs/02-usage/050_configuration.md b/docs/02-usage/050_configuration.md index fe2b0d9e..404e8300 100644 --- a/docs/02-usage/050_configuration.md +++ b/docs/02-usage/050_configuration.md @@ -863,3 +863,11 @@ prompts: ``` It is advisable to use the default prompt as a starting point and modify it to suit your needs. + +### Usage Reporting + +On startup, Serena reports anonymous usage data to help us understand Serena usage. +Specifically, we collect the Serena version, the operating system & language backend being used as well as the dashboard enabled status. +No personally identifiable information or project-specific information is collected. + +If you want to opt out of usage reporting, set the environment variable `SERENA_USAGE_REPORTING` to `false`. diff --git a/src/serena/agent.py b/src/serena/agent.py index 63a3d7b0..99f14bd1 100644 --- a/src/serena/agent.py +++ b/src/serena/agent.py @@ -410,8 +410,7 @@ class SerenaAgent: self._send_usage_info() def _send_usage_info(self) -> None: - is_ci = os.getenv("CI") == "true" or os.getenv("GITHUB_ACTIONS") == "true" - if is_ci: + if os.getenv("CI") == "true" or os.getenv("GITHUB_ACTIONS") == "true" or os.getenv("SERENA_USAGE_REPORTING") == "false": return params: dict[str, str | int] = { "os": platform.system(),