diff --git a/.github/workflows/public-ecr.yaml b/.github/workflows/public-ecr.yaml index 97177b5..d236277 100644 --- a/.github/workflows/public-ecr.yaml +++ b/.github/workflows/public-ecr.yaml @@ -32,13 +32,3 @@ jobs: context: "{{defaultContext}}" push: true tags: public.ecr.aws/kubefirst/metrics-client:${{ github.ref_name }} - - name: Create Release - id: create_release - uses: actions/create-release@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - tag_name: ${{ github.ref }} - release_name: Release ${{ github.ref }} - draft: false - prerelease: false diff --git a/cmd/transmit.go b/cmd/transmit.go index 3add3a2..6fe8b29 100644 --- a/cmd/transmit.go +++ b/cmd/transmit.go @@ -34,7 +34,6 @@ var transmitCmd = &cobra.Command{ Long: `transmit a metric`, Run: func(cmd *cobra.Command, args []string) { // Telemetry handler - kubefirstVersion := os.Getenv("KUBEFIRST_VERSION") if kubefirstVersion == "" { kubefirstVersion = "development" @@ -47,14 +46,14 @@ var transmitCmd = &cobra.Command{ } machineID, _ := machineid.ID() - segmentClient := telemetry.SegmentClient{ + segmentClient := &telemetry.SegmentClient{ TelemetryEvent: telemetry.TelemetryEvent{ - CliVersion: os.Getenv("CLI_VERSION"), + CliVersion: os.Getenv("KUBEFIRST_VERSION"), CloudProvider: os.Getenv("CLOUD_PROVIDER"), ClusterID: os.Getenv("CLUSTER_ID"), ClusterType: os.Getenv("CLUSTER_TYPE"), DomainName: strippedDomainName, - ErrorMessage: err.Error(), + ErrorMessage: "", GitProvider: os.Getenv("GIT_PROVIDER"), InstallMethod: os.Getenv("INSTALL_METHOD"), KubefirstClient: os.Getenv("KUBEFIRST_CLIENT"), @@ -72,7 +71,7 @@ var transmitCmd = &cobra.Command{ switch transmitType { case "cluster-zero": //started event - err := telemetry.SendEvent(&segmentClient, telemetry.ClusterInstallStarted, "") + err := telemetry.SendEvent(segmentClient, telemetry.ClusterInstallStarted, "") if err != nil { log.Error(err) } @@ -80,7 +79,7 @@ var transmitCmd = &cobra.Command{ //completed event segmentClient.TelemetryEvent.MetricName = telemetry.ClusterInstallCompleted - err = telemetry.SendEvent(&segmentClient, telemetry.ClusterInstallCompleted, err.Error()) + err = telemetry.SendEvent(segmentClient, telemetry.ClusterInstallCompleted, "") if err != nil { log.Error(err) }