Avoid fission installation failure due to analytics connection error (#2457)

This commit is contained in:
Shubham Bansal
2022-06-15 11:32:06 +05:30
committed by GitHub
parent b80b41e1fd
commit 7f21b708e7
4 changed files with 168 additions and 18 deletions
+6 -1
View File
@@ -51,7 +51,12 @@ func eventCommandHandler(cmd *cobra.Command, args []string) error {
}
ctx := context.Background()
return tracker.Tracker.SendEvent(ctx, event)
t, err := tracker.NewTracker()
if err != nil {
return err
}
return t.SendEvent(ctx, event)
}
//EventCommand reports an event to analytics
+6 -2
View File
@@ -17,14 +17,18 @@ limitations under the License.
package main
import (
"log"
"go.uber.org/zap"
"github.com/fission/fission/cmd/reporter/app"
"github.com/fission/fission/pkg/utils/loggerfactory"
)
func main() {
logger := loggerfactory.GetLogger()
defer logger.Sync()
err := app.App().Execute()
if err != nil {
log.Fatal(err)
logger.Error("error occurred during analytics reporting", zap.Error(err))
}
}