Skip to content

Commit 030ba6f

Browse files
Abhishek AgarwalKiran Mova
authored andcommitted
chore(analytic): send install event on localpv-provisioner start (#108)
* Send install events on localpv-provisioner start Signed-off-by: Abhishek Agarwal <[email protected]>
1 parent 3316cba commit 030ba6f

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

cmd/provisioner-localpv/app/start.go

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ import (
2222
"os"
2323
"strings"
2424

25+
menv "github.com/openebs/maya/pkg/env/v1alpha1"
26+
analytics "github.com/openebs/maya/pkg/usage"
2527
"github.com/pkg/errors"
2628
"github.com/spf13/cobra"
2729
"github.com/spf13/pflag"
@@ -108,6 +110,12 @@ func Start(cmd *cobra.Command) error {
108110
provisioner,
109111
pvController.LeaderElection(isLeaderElectionEnabled()),
110112
)
113+
114+
if menv.Truthy(menv.OpenEBSEnableAnalytics) {
115+
analytics.New().Build().InstallBuilder(true).Send()
116+
go analytics.PingCheck()
117+
}
118+
111119
klog.V(4).Info("Provisioner started")
112120
//Run the provisioner till a shutdown signal is received.
113121
pc.Run(ctx)

0 commit comments

Comments
 (0)