Repository: feast-dev/feast

Issue:
usage.feast.dev ssl cert wrong
Looks like ssl cert got updated yesterday, and it's set for *.netlify.app and causing issues in logs: 
![image](https://github.com/feast-dev/feast/assets/7751607/fdb9f25d-b5a3-4d9f-971f-a240339abb18)


```
WARNING   2024-01-16 16:46:30,278 urllib3.connection.connection:547 | Certificate did not match expected hostname: usage.feast.dev. Certificate: {'subject': ((('countryName', 'US'),), (('stateOrProvinceName', 'California'),), (('localityName', 'San Francisco'),), (('organizationName', 'Netlify, Inc'),), (('commonName', '*.netlify.app'),)), 'issuer': ((('countryName', 'US'),), (('organizationName', 'DigiCert Inc'),), (('commonName', 'DigiCert Global G2 TLS RSA SHA256 2020 CA1'),)), 'version': 3, 'serialNumber': '03ED167A2659DA278E7B21CDBEB33E32', 'notBefore': 'Jan 15 00:00:00 2024 GMT', 'notAfter': 'Feb 14 23:59:59 2025 GMT', 'subjectAltName': (('DNS', '*.netlify.app'), ('DNS', 'netlify.app')), 'OCSP': ('http://ocsp.digicert.com/',), 'caIssuers': ('http://cacerts.digicert.com/DigiCertGlobalG2TLSRSASHA2562020CA1-1.crt',), 'crlDistributionPoints': ('http://crl3.digicert.com/DigiCertGlobalG2TLSRSASHA2562020CA1-1.crl', 'http://crl4.digicert.com/DigiCertGlobalG2TLSRSASHA2562020CA1-1.crl')}
```


Discussion:
ran into the same issue. as a stopgap, i set `FEAST_USAGE` to `false` and it went away. I know I shouldn't really be advocating for people to work around feast telemetry, but it should keep things quiet until a real fix goes in.
This has already been fixed, right?
found similar warnings when using Feast in OpenShift/Kubernetes but setting environments  ```FEAST_USAGE=False``` and it get disappeared.  
When running "feast serve" the certificate warning still appears as of a pip download on Feb 25, 2024.
let's disable the feature of "usage.feast.dev". It will be more useful for the users who use Feast at Enterprise level.

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,11 +29,11 @@
 # Environment variable for registry
 REGISTRY_ENV_NAME: str = "REGISTRY_BASE64"
 
-# Environment variable for toggling usage
+# Environment variable for toggling the Usage feature
 FEAST_USAGE = "FEAST_USAGE"
 
-# Default value for FEAST_USAGE when environment variable is not set
-DEFAULT_FEAST_USAGE_VALUE = "True"
+# Environment variable for FEAST_USAGE_ENDPOINT
+FEAST_USAGE_ENDPOINT = "FEAST_USAGE_ENDPOINT"
 
 # 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
@@ -30,15 +30,17 @@
 import requests
 
 from feast import flags_helper
-from feast.constants import DEFAULT_FEAST_USAGE_VALUE, FEAST_USAGE
+from feast.constants import FEAST_USAGE, FEAST_USAGE_ENDPOINT
 from feast.version import get_version
 
-USAGE_ENDPOINT = "https://usage.feast.dev"
-
 _logger = logging.getLogger(__name__)
 _executor = concurrent.futures.ThreadPoolExecutor(max_workers=3)
 
-_is_enabled = os.getenv(FEAST_USAGE, default=DEFAULT_FEAST_USAGE_VALUE) == "True"
+_is_enabled = os.getenv(FEAST_USAGE, default="False") == "True"
+
+# Default usage endpoint value.
+# Will raise an exception if the configured value is not working.
+_usage_endpoint = os.getenv(FEAST_USAGE_ENDPOINT, default="")
 
 _constant_attributes = {
     "project_id": "",
@@ -177,7 +179,7 @@ def _set_installation_id():
 
 
 def _export(event: typing.Dict[str, typing.Any]):
-    _executor.submit(requests.post, USAGE_ENDPOINT, json=event, timeout=2)
+    _executor.submit(requests.post, _usage_endpoint, json=event, timeout=2)
 
 
 def _produce_event(ctx: UsageContext):


Test patch: