-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
introduce posthog #367
base: main
Are you sure you want to change the base?
introduce posthog #367
Conversation
011fce7
to
4d51f4e
Compare
@@ -247,7 +250,25 @@ func (p *Plural) deploy(c *cli.Context) error { | |||
fmt.Println("") | |||
} | |||
} | |||
|
|||
for _, ch := range man.Charts { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should send this info from the server if we want it in posthog, having the cli send it is error prone and could potentially cause failed installs
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can't track the actual commands users execute server side since it doesn't know when somebody runs plural deploy
. Having it in the CLI allows us to have a better metric of which commands people run, how often they run, and if they encountered an error when running the command. This can give us a metric of how many successful deploys have happened versus how many errors have occurred. It can also give us a timeline of a user's actions. For example, user deploys but runs into an error for app X, user then runs install
to change a config and build
for app X to fix that config, user then runs deploy
again and it runs successfully.
Each command that a user executes and if it passes or fails is very important data so we can have a better idea of how many command executions pass versus fail and where they fail exactly.
@@ -120,6 +121,17 @@ func (s *Scaffold) Execute(wk *wkspace.Workspace, force bool) error { | |||
preflight.Sha = "" | |||
} | |||
|
|||
for _, ch := range wk.Charts { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Similarly, this is better to send server-side
pkg/bundle/installer.go
Outdated
return err | ||
} | ||
|
||
if err := client.InstallRecipe(recipe.Id); err != nil { | ||
posthogProperty.Error = fmt.Errorf("failed install recipe") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should we just add this to our existing error logging wrapper?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have moved error handling to tracked
validator
Summary
Introduce posthog for plural bundle install, build, and deploy commands.
Labels
Test Plan
Checklist