Skip to content

Commit

Permalink
report oss/pro in analytics
Browse files Browse the repository at this point in the history
While we're there, also report the update stream the user has
configured; this will give us info on version pinning.
  • Loading branch information
Yuval Shavit authored Jan 24, 2023
1 parent 4cc3440 commit 020e12e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pkg/cli/klothomain.go
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,7 @@ func (km KlothoMain) run(cmd *cobra.Command, args []string) (err error) {
analyticsClient, err := analytics.NewClient(map[string]interface{}{
"version": km.Version,
"strict": cfg.strict,
"edition": km.DefaultUpdateStream,
})
if err != nil {
return errors.New(fmt.Sprintf("Issue retrieving user info: %s. \nYou may need to run: klotho --login <email>", err))
Expand Down Expand Up @@ -204,6 +205,8 @@ func (km KlothoMain) run(cmd *cobra.Command, args []string) (err error) {
if err != nil {
return err
}
updateStream := OptionOrDefault(options.Update.Stream, km.DefaultUpdateStream)
analyticsClient.Properties["updateStream"] = updateStream

if cfg.version {
var versionQualifier string
Expand All @@ -219,7 +222,6 @@ func (km KlothoMain) run(cmd *cobra.Command, args []string) (err error) {
}

// if update is specified do the update in place
updateStream := OptionOrDefault(options.Update.Stream, km.DefaultUpdateStream)
var klothoUpdater = updater.Updater{
ServerURL: updater.DefaultServer,
Stream: updateStream,
Expand Down

0 comments on commit 020e12e

Please sign in to comment.