Skip to content

Commit

Permalink
Add telemetry to other CLI commands (#1505)
Browse files Browse the repository at this point in the history
Signed-off-by: Jacob Klegar <[email protected]>
  • Loading branch information
jklegar authored and woop committed Apr 27, 2021
1 parent 5633d2b commit 16fdaf2
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions sdk/python/feast/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
registry_dump,
teardown,
)
from feast.telemetry import Telemetry

_logger = logging.getLogger(__name__)
DATETIME_ISO = "%Y-%m-%dT%H:%M:%s"
Expand Down Expand Up @@ -156,6 +157,8 @@ def apply_total_command():
"""
cli_check_repo(Path.cwd())
repo_config = load_repo_config(Path.cwd())
tele = Telemetry()
tele.log("apply")
try:
apply_total(repo_config, Path.cwd())
except FeastProviderLoginError as e:
Expand All @@ -169,6 +172,8 @@ def teardown_command():
"""
cli_check_repo(Path.cwd())
repo_config = load_repo_config(Path.cwd())
tele = Telemetry()
tele.log("teardown")

teardown(repo_config, Path.cwd())

Expand All @@ -180,6 +185,8 @@ def registry_dump_command():
"""
cli_check_repo(Path.cwd())
repo_config = load_repo_config(Path.cwd())
tele = Telemetry()
tele.log("registry-dump")

registry_dump(repo_config, repo_path=Path.cwd())

Expand Down Expand Up @@ -250,6 +257,8 @@ def init_command(project_directory, minimal: bool, template: str):
if minimal:
template = "minimal"

tele = Telemetry()
tele.log("init")
init_repo(project_directory, template)


Expand Down

0 comments on commit 16fdaf2

Please sign in to comment.