diff --git a/cmd/k3d/create.go b/cmd/k3d/create.go index e659a6252..1ce042826 100644 --- a/cmd/k3d/create.go +++ b/cmd/k3d/create.go @@ -329,7 +329,6 @@ func runK3d(cmd *cobra.Command, args []string) error { segClient := segment.InitClient(clusterId, clusterTypeFlag, gitProviderFlag) defer segClient.Client.Close() - telemetry.SendEvent(segClient, telemetry.ClusterInstallStarted, "") // Progress output progressPrinter.AddTracker("preflight-checks", "Running preflight checks", 5) @@ -462,7 +461,6 @@ func runK3d(cmd *cobra.Command, args []string) error { log.Info().Msg("validation and kubefirst cli environment check is complete") - telemetry.SendEvent(segClient, telemetry.InitCompleted, "") telemetry.SendEvent(segClient, telemetry.InitCompleted, "") // Swap tokens for git protocol @@ -1412,7 +1410,6 @@ func runK3d(cmd *cobra.Command, args []string) error { } // Mark cluster install as complete - telemetry.SendEvent(segClient, telemetry.ClusterInstallCompleted, "") viper.Set("kubefirst-checks.cluster-install-complete", true) viper.WriteConfig() diff --git a/internal/segment/segment.go b/internal/segment/segment.go index d4b1808e3..9644d3dac 100644 --- a/internal/segment/segment.go +++ b/internal/segment/segment.go @@ -12,7 +12,7 @@ import ( ) const ( - kubefirstClient string = "api" + kubefirstClient string = "cli" ) func InitClient(clusterId, clusterType, gitProvider string) *telemetry.SegmentClient { @@ -28,14 +28,15 @@ func InitClient(clusterId, clusterType, gitProvider string) *telemetry.SegmentCl ClusterType: clusterType, DomainName: k3d.DomainName, GitProvider: gitProvider, - InstallMethod: "kubefirst-launch", + InstallMethod: "k3d", KubefirstClient: kubefirstClient, KubefirstTeam: os.Getenv("KUBEFIRST_TEAM"), KubefirstTeamInfo: os.Getenv("KUBEFIRST_TEAM_INFO"), MachineID: machineID, + ParentClusterId: clusterId, ErrorMessage: "", UserId: machineID, - MetricName: telemetry.ClusterInstallStarted, + MetricName: telemetry.ClusterInstallCompleted, }, Client: sc, }