Skip to content

Commit

Permalink
Send loginv2 telemetry event
Browse files Browse the repository at this point in the history
  • Loading branch information
masenf committed Nov 28, 2024
1 parent 109c779 commit 07dfc36
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion reflex/reflex.py
Original file line number Diff line number Diff line change
Expand Up @@ -370,7 +370,9 @@ def loginv2(loglevel: constants.LogLevel = typer.Option(config.loglevel)):

check_version()

hosting_cli.login()
validated_info = hosting_cli.login()
if validated_info is not None:
telemetry.send("loginv2", user_uuid=validated_info.get("user_id"))


@cli.command()
Expand Down
2 changes: 1 addition & 1 deletion reflex/utils/telemetry.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ def _prepare_event(event: str, **kwargs) -> dict:

cpuinfo = get_cpu_info()

additional_keys = ["template", "context", "detail"]
additional_keys = ["template", "context", "detail", "user_uuid"]
additional_fields = {
key: value for key in additional_keys if (value := kwargs.get(key)) is not None
}
Expand Down

0 comments on commit 07dfc36

Please sign in to comment.