Skip to content

Commit 34f0724

Browse files
revert telemetry change for lstk root command
1 parent ef2abb5 commit 34f0724

2 files changed

Lines changed: 5 additions & 2 deletions

File tree

cmd/root.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -214,6 +214,9 @@ func instrumentCommands(cmd *cobra.Command, tel *telemetry.Client) {
214214
}
215215

216216
commandName := strings.TrimPrefix(c.CommandPath(), c.Root().Name()+" ")
217+
if c == c.Root() {
218+
commandName = "start"
219+
}
217220
tel.EmitCommand(c.Context(), commandName, flags, time.Since(startTime).Milliseconds(), exitCode, errorMsg)
218221

219222
return runErr

test/integration/telemetry_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,9 +104,9 @@ func TestStartCommandSendsTelemetryEvent(t *testing.T) {
104104
}
105105
})
106106

107-
t.Run("lstk (no subcommand) emits command=lstk", func(t *testing.T) {
107+
t.Run("lstk (no subcommand) emits command=start", func(t *testing.T) {
108108
runCmd(t)
109-
assertCommandTelemetry(t, events, "lstk", 0)
109+
assertCommandTelemetry(t, events, "start", 0)
110110
})
111111
}
112112

0 commit comments

Comments
 (0)