telemetry: track the correct action

Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
This commit is contained in:
Andrea Luzzardi 2022-03-08 23:32:01 -08:00
parent 3d06252858
commit e1b76f628a

View File

@ -60,14 +60,15 @@ var doCmd = &cobra.Command{
if err != nil { if err != nil {
lg.Fatal().Err(err).Msg("failed to load plan") lg.Fatal().Err(err).Msg("failed to load plan")
} }
target := getTargetPath(args)
doneCh := common.TrackCommand(ctx, cmd, &telemetry.Property{ doneCh := common.TrackCommand(ctx, cmd, &telemetry.Property{
Name: "action", Name: "action",
Value: p.Action().Path.String(), Value: target.String(),
}) })
err = cl.Do(ctx, p.Context(), func(ctx context.Context, s solver.Solver) error { err = cl.Do(ctx, p.Context(), func(ctx context.Context, s solver.Solver) error {
return p.Do(ctx, getTargetPath(args), s) return p.Do(ctx, target, s)
}) })
<-doneCh <-doneCh