Skip to content

fix(telemetry): honor the SCRAPEGRAPHAI_TELEMETRY_ENABLED env var - #1119

Open
hakoke wants to merge 1 commit into
ScrapeGraphAI:mainfrom
hakoke:fix/telemetry-env-var
Open

fix(telemetry): honor the SCRAPEGRAPHAI_TELEMETRY_ENABLED env var#1119
hakoke wants to merge 1 commit into
ScrapeGraphAI:mainfrom
hakoke:fix/telemetry-env-var

Conversation

@hakoke

@hakoke hakoke commented Jul 28, 2026

Copy link
Copy Markdown

Fixes #1118.

_check_config_and_environ_for_telemetry_flag re-read the config file inside the env var branch, so the opt-out documented in the README never had any effect. The branch now parses the variable's value with the same true/false strings configparser accepts (1/yes/true/on, 0/no/false/off, any casing). The env var wins over the config file since it is the more explicit setting, and unrecognized values keep the default instead of raising, matching how the config path already behaves.

Verified by importing the package in a subprocess for each value: false, False, FALSE, 0, no and off now disable telemetry, true, 1, yes and on keep it enabled, unset keeps the current default, and a config file value is still honored when the variable is not set. The nine test files that CI runs pass before and after the change. Happy to add a small unit test for this function and register it in test-suite.yml if you want one.

@dosubot dosubot Bot added the size:S This PR changes 10-29 lines, ignoring generated files. label Jul 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:S This PR changes 10-29 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

SCRAPEGRAPHAI_TELEMETRY_ENABLED=false does not disable telemetry

1 participant