Skip to content

Commit 2013c04

Browse files
author
Tsotne Tabidze
authored
Rename telemetry to usage (#1660)
* Rename telemetry to usage Signed-off-by: Tsotne Tabidze <tsotne@tecton.ai> * Update docs Signed-off-by: Tsotne Tabidze <tsotne@tecton.ai> * Update .prow and infra Signed-off-by: Tsotne Tabidze <tsotne@tecton.ai> * Rename file Signed-off-by: Tsotne Tabidze <tsotne@tecton.ai> * Change url Signed-off-by: Tsotne Tabidze <tsotne@tecton.ai> * Re-add telemetry.md for backwards-compatibility Signed-off-by: Tsotne Tabidze <tsotne@tecton.ai>
1 parent 83c76f5 commit 2013c04

File tree

17 files changed

+112
-115
lines changed

17 files changed

+112
-115
lines changed

.prow.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,13 +64,13 @@ presubmits:
6464
branches:
6565
- ^v0\.(3|4)-branch$
6666

67-
- name: test-telemetry
67+
- name: test-usage
6868
decorate: true
6969
run_if_changed: "sdk/python/.*"
7070
spec:
7171
containers:
7272
- image: python:3.7
73-
command: ["infra/scripts/test-telemetry.sh"]
73+
command: ["infra/scripts/test-usage.sh"]
7474
env:
7575
- name: GOOGLE_APPLICATION_CREDENTIALS
7676
value: /etc/gcloud/service-account.json

docs/SUMMARY.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
* [.feastignore](reference/feature-repository/feast-ignore.md)
4444
* [Feast CLI reference](reference/feast-cli-commands.md)
4545
* [Python API reference](http://rtd.feast.dev/)
46-
* [Telemetry](reference/telemetry.md)
46+
* [Usage](reference/usage.md)
4747

4848
## Feast on Kubernetes
4949

docs/advanced/telemetry.md

Lines changed: 0 additions & 10 deletions
This file was deleted.

docs/reference/usage.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# Usage
2+
3+
### How Feast SDK usage is measured
4+
5+
The Feast project logs anonymous usage statistics and errors in order to inform our planning. Several client methods are tracked, beginning in Feast 0.9. Users are assigned a UUID which is sent along with the name of the method, the Feast version, the OS \(using `sys.platform`\), and the current time.
6+
7+
The [source code](https://github.com/feast-dev/feast/blob/master/sdk/python/feast/usage.py) is available here.
8+
9+
### How to disable usage logging
10+
11+
Set the environment variable `FEAST_USAGE` to `False`.

infra/scripts/test-docker-compose.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,4 +70,4 @@ docker exec \
7070
-e DISABLE_FEAST_SERVICE_FIXTURES=true \
7171
--user root \
7272
feast_jupyter_1 bash \
73-
-c 'cd /feast/tests && python -m pip install -r requirements.txt && FEAST_TELEMETRY=False pytest e2e/ --ingestion-jar https://storage.googleapis.com/feast-jobs/spark/ingestion/feast-ingestion-spark-${FEAST_VERSION}.jar --redis-url redis:6379 --core-url core:6565 --serving-url online_serving:6566 --job-service-url jobservice:6568 --staging-path file:///shared/staging/ --kafka-brokers kafka:9092 --statsd-url prometheus_statsd:9125 --prometheus-url prometheus_statsd:9102 --feast-version develop'
73+
-c 'cd /feast/tests && python -m pip install -r requirements.txt && FEAST_USAGE=False pytest e2e/ --ingestion-jar https://storage.googleapis.com/feast-jobs/spark/ingestion/feast-ingestion-spark-${FEAST_VERSION}.jar --redis-url redis:6379 --core-url core:6565 --serving-url online_serving:6566 --job-service-url jobservice:6568 --staging-path file:///shared/staging/ --kafka-brokers kafka:9092 --statsd-url prometheus_statsd:9125 --prometheus-url prometheus_statsd:9102 --feast-version develop'

infra/scripts/test-end-to-end.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,6 @@ make build-java-no-tests REVISION=develop
1010
python -m pip install --upgrade pip setuptools wheel
1111
make install-python
1212
python -m pip install -qr tests/requirements.txt
13-
export FEAST_TELEMETRY="False"
13+
export FEAST_USAGE="False"
1414

1515
su -p postgres -c "PATH=$PATH HOME=/tmp pytest -v tests/e2e/ --feast-version develop"

infra/scripts/test-integration.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,5 @@ python -m pip install --upgrade pip setuptools wheel
44
make install-python
55
python -m pip install -qr tests/requirements.txt
66

7-
export FEAST_TELEMETRY="False"
7+
export FEAST_USAGE="False"
88
pytest tests/integration --dataproc-cluster-name feast-e2e --dataproc-project kf-feast --dataproc-region us-central1 --dataproc-staging-location gs://feast-templocation-kf-feast
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,5 @@ LOGS_ARTIFACT_PATH=/logs/artifacts
77

88
cd sdk/python/
99
pip install -e ".[ci]"
10-
cd telemetry_tests/
10+
cd usage_tests/
1111
pytest --junitxml=${LOGS_ARTIFACT_PATH}/python-sdk-test-report.xml

sdk/python/feast/client.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@
6969
)
7070
from feast.protos.feast.serving.ServingService_pb2_grpc import ServingServiceStub
7171
from feast.registry import Registry
72-
from feast.telemetry import Telemetry
72+
from feast.usage import Usage
7373

7474
_logger = logging.getLogger(__name__)
7575

@@ -117,7 +117,7 @@ def __init__(self, options: Optional[Dict[str, str]] = None, **kwargs):
117117
if self._config.getboolean(opt.ENABLE_AUTH):
118118
self._auth_metadata = feast_auth.get_auth_metadata_plugin(self._config)
119119

120-
self._tele = Telemetry()
120+
self._usage = Usage()
121121

122122
@property
123123
def config(self) -> Config:
@@ -467,7 +467,7 @@ def apply(
467467
>>> feast_client.apply(entity)
468468
"""
469469

470-
self._tele.log("apply")
470+
self._usage.log("apply")
471471
if project is None:
472472
project = self.project
473473

@@ -581,7 +581,7 @@ def get_entity(self, name: str, project: str = None) -> Entity:
581581
none is found
582582
"""
583583

584-
self._tele.log("get_entity")
584+
self._usage.log("get_entity")
585585

586586
if project is None:
587587
project = self.project
@@ -706,7 +706,7 @@ def get_feature_table(self, name: str, project: str = None) -> FeatureTable:
706706
none is found
707707
"""
708708

709-
self._tele.log("get_feature_table")
709+
self._usage.log("get_feature_table")
710710

711711
if project is None:
712712
project = self.project
@@ -847,7 +847,7 @@ def ingest(
847847
>>> client.ingest(driver_ft, ft_df)
848848
"""
849849

850-
self._tele.log("ingest")
850+
self._usage.log("ingest")
851851
if project is None:
852852
project = self.project
853853
if isinstance(feature_table, str):
@@ -972,7 +972,7 @@ def get_online_features(
972972
{'sales:daily_transactions': [1.1,1.2], 'sales:customer_id': [0,1]}
973973
"""
974974

975-
self._tele.log("get_online_features")
975+
self._usage.log("get_online_features")
976976
try:
977977
response = self._serving_service.GetOnlineFeaturesV2(
978978
GetOnlineFeaturesRequestV2(

sdk/python/feast/constants.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -260,8 +260,8 @@ class ConfigOptions(metaclass=ConfigMeta):
260260
#: Oauth token request url
261261
OAUTH_TOKEN_REQUEST_URL: Optional[str] = None
262262

263-
#: Telemetry enabled
264-
TELEMETRY = "True"
263+
#: Usage enabled
264+
USAGE = "True"
265265

266266
#: Object store registry
267267
REGISTRY_PATH: Optional[str] = None

0 commit comments

Comments
 (0)