Repository: feast-dev/feast

Issue:
FEAST_USAGE should default to "False"
**Is your feature request related to a problem? Please describe.**
I'm currently upgrading feast for our organization, making quite a big jump from 0.8 to 0.14. During testing I discovered the addition of the Telemetry/Usage class, to send anonymized metrics/error reports the feast devs.

While it is mentioned in the logging and if you read the release log carefully, I'm surprised/annoyed the decision was made to make `FEAST_USAGE="True"` the default. For my organization, metrics reporting like this will result in a big NO from our security team, regardless of anonymization. While other organizations might not be so strict, I'm not so sure they would appreciate it either. 

A feature store is a complex system to deploy, and to make sure we disable usage I have to set up `FEAST_USAGE="True"` everywhere. While not impossible, it is really easy to miss one or two corner cases, and concerns such as these basically block us from using feast directly. 

I understand the need for metrics/feedback to steer future feast development work, but IMHO this cannot be the way to that goal.

For now, I will resort to forking feast inside our organization and changing the default to False myself.

**Describe the solution you'd like**
Make sure the default `FEAST_USAGE="False"` is used

**Describe alternatives you've considered**
Mentioned above


Discussion:
Hi @jbvaningen!

The tricky thing is that keeping `FEAST_USAGE="False"` will result in virtually nobody enabling telemetry, meaning it's actually more an argument for removing telemetry completely. We've also tried to make it super clear to users that we are tracking metrics (by printing a warning during first startup), and we do provide a way to disable it. Feast is also not very unique in tracking metrics to help us inform our development (other projects like Ray, dbt, dagster, etc, are also tracking anonymized metrics).

What about if we provided a build of Feast with telemetry removed, something like `feast-no-telemetry` on Pypi?
Hi @woop, thanks for the prompt reply!

I like your suggestion, if a telemetry-free feast is available on pypi then we would definitely make use of it!

Resolving patch:
diff --git a/sdk/python/feast/constants.py b/sdk/python/feast/constants.py
--- a/sdk/python/feast/constants.py
+++ b/sdk/python/feast/constants.py
@@ -29,6 +29,9 @@
 # Environment variable for toggling usage
 FEAST_USAGE = "FEAST_USAGE"
 
+# Default value for FEAST_USAGE when environment variable is not set
+DEFAULT_FEAST_USAGE_VALUE = "True"
+
 # Environment variable for the path for overwriting universal test configs
 FULL_REPO_CONFIGS_MODULE_ENV_NAME: str = "FULL_REPO_CONFIGS_MODULE"
 
diff --git a/sdk/python/feast/usage.py b/sdk/python/feast/usage.py
--- a/sdk/python/feast/usage.py
+++ b/sdk/python/feast/usage.py
@@ -29,7 +29,7 @@
 
 import requests
 
-from feast.constants import FEAST_USAGE
+from feast.constants import DEFAULT_FEAST_USAGE_VALUE, FEAST_USAGE
 from feast.version import get_version
 
 USAGE_ENDPOINT = "https://usage.feast.dev"
@@ -37,7 +37,7 @@
 _logger = logging.getLogger(__name__)
 _executor = concurrent.futures.ThreadPoolExecutor(max_workers=1)
 
-_is_enabled = os.getenv(FEAST_USAGE, default="True") == "True"
+_is_enabled = os.getenv(FEAST_USAGE, default=DEFAULT_FEAST_USAGE_VALUE) == "True"
 
 _constant_attributes = {
     "session_id": str(uuid.uuid4()),


Test patch: