Skip to content

Commit

Permalink
adjustments for telemetry
Browse files Browse the repository at this point in the history
  • Loading branch information
johndietz committed Nov 27, 2023
1 parent 1f64b36 commit a74310e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
4 changes: 1 addition & 3 deletions cmd/k3d/create.go
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,7 @@ func runK3d(cmd *cobra.Command, args []string) error {

segClient := segment.InitClient(clusterId, clusterTypeFlag, gitProviderFlag)
defer segClient.Client.Close()
telemetry.SendEvent(segClient, telemetry.ClusterInstallStarted, "")
//telemetry.SendEvent(segClient, telemetry.ClusterInstallStarted, "")

// Progress output
progressPrinter.AddTracker("preflight-checks", "Running preflight checks", 5)
Expand Down Expand Up @@ -462,7 +462,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
Expand Down Expand Up @@ -1412,7 +1411,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()

Expand Down
3 changes: 2 additions & 1 deletion internal/segment/segment.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,10 @@ func InitClient(clusterId, clusterType, gitProvider string) *telemetry.SegmentCl
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,
}
Expand Down

0 comments on commit a74310e

Please sign in to comment.