Avoid fission installation failure due to analytics connection error (#2457)
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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))
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user