Skip to content

Commit 2b63bee

Browse files
committed
Add desktop_uuid in telemetry (next to user_uuid)
Signed-off-by: Guillaume Tardif <guillaume.tardif@gmail.com>
1 parent f99a708 commit 2b63bee

20 files changed

Lines changed: 81 additions & 72 deletions

File tree

cmd/root/a2a.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,9 @@ func newA2ACmd() *cobra.Command {
3636
}
3737

3838
func (f *a2aFlags) runA2ACommand(cmd *cobra.Command, args []string) error {
39-
telemetry.TrackCommand("serve", append([]string{"a2a"}, args...))
40-
4139
ctx := cmd.Context()
40+
telemetry.TrackCommand(ctx, "serve", append([]string{"a2a"}, args...))
41+
4242
out := cli.NewPrinter(cmd.OutOrStdout())
4343
agentFilename := args[0]
4444

cmd/root/acp.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,9 @@ func newACPCmd() *cobra.Command {
3737
}
3838

3939
func (f *acpFlags) runACPCommand(cmd *cobra.Command, args []string) error {
40-
telemetry.TrackCommand("serve", append([]string{"acp"}, args...))
41-
4240
ctx := cmd.Context()
41+
telemetry.TrackCommand(ctx, "serve", append([]string{"acp"}, args...))
42+
4343
agentFilename := args[0]
4444

4545
// Expand tilde in session database path

cmd/root/alias.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ func newAliasRemoveCmd() *cobra.Command {
112112
}
113113

114114
func runAliasAddCommand(cmd *cobra.Command, args []string, flags *aliasAddFlags) error {
115-
telemetry.TrackCommand("alias", append([]string{"add"}, args...))
115+
telemetry.TrackCommand(cmd.Context(), "alias", append([]string{"add"}, args...))
116116

117117
out := cli.NewPrinter(cmd.OutOrStdout())
118118
name := args[0]
@@ -179,7 +179,7 @@ func runAliasAddCommand(cmd *cobra.Command, args []string, flags *aliasAddFlags)
179179
}
180180

181181
func runAliasListCommand(cmd *cobra.Command, args []string) error {
182-
telemetry.TrackCommand("alias", append([]string{"list"}, args...))
182+
telemetry.TrackCommand(cmd.Context(), "alias", append([]string{"list"}, args...))
183183

184184
out := cli.NewPrinter(cmd.OutOrStdout())
185185

@@ -235,7 +235,7 @@ func runAliasListCommand(cmd *cobra.Command, args []string) error {
235235
}
236236

237237
func runAliasRemoveCommand(cmd *cobra.Command, args []string) error {
238-
telemetry.TrackCommand("alias", append([]string{"remove"}, args...))
238+
telemetry.TrackCommand(cmd.Context(), "alias", append([]string{"remove"}, args...))
239239

240240
out := cli.NewPrinter(cmd.OutOrStdout())
241241
name := args[0]

cmd/root/api.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,8 @@ func newAPICmd() *cobra.Command {
4747
}
4848

4949
func (f *apiFlags) runAPICommand(cmd *cobra.Command, args []string) error {
50-
telemetry.TrackCommand("serve", append([]string{"api"}, args...))
51-
5250
ctx := cmd.Context()
51+
telemetry.TrackCommand(ctx, "serve", append([]string{"api"}, args...))
5352

5453
out := cli.NewPrinter(cmd.OutOrStdout())
5554
agentsPath := args[0]

cmd/root/debug.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ func (f *debugFlags) loadTeam(ctx context.Context, agentFilename string, opts ..
7676
}
7777

7878
func (f *debugFlags) runDebugConfigCommand(cmd *cobra.Command, args []string) error {
79-
telemetry.TrackCommand("debug", append([]string{"config"}, args...))
79+
telemetry.TrackCommand(cmd.Context(), "debug", append([]string{"config"}, args...))
8080

8181
agentSource, err := config.Resolve(args[0], f.runConfig.EnvProvider())
8282
if err != nil {
@@ -92,7 +92,7 @@ func (f *debugFlags) runDebugConfigCommand(cmd *cobra.Command, args []string) er
9292
}
9393

9494
func (f *debugFlags) runDebugToolsetsCommand(cmd *cobra.Command, args []string) error {
95-
telemetry.TrackCommand("debug", append([]string{"toolsets"}, args...))
95+
telemetry.TrackCommand(cmd.Context(), "debug", append([]string{"toolsets"}, args...))
9696

9797
ctx := cmd.Context()
9898

@@ -132,7 +132,7 @@ func (f *debugFlags) runDebugToolsetsCommand(cmd *cobra.Command, args []string)
132132
}
133133

134134
func (f *debugFlags) runDebugTitleCommand(cmd *cobra.Command, args []string) error {
135-
telemetry.TrackCommand("debug", append([]string{"title"}, args...))
135+
telemetry.TrackCommand(cmd.Context(), "debug", append([]string{"title"}, args...))
136136

137137
ctx := cmd.Context()
138138

cmd/root/debug_auth.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,9 @@ func newDebugAuthCmd() *cobra.Command {
3333
Short: "Print Docker Desktop authentication information",
3434
Args: cobra.NoArgs,
3535
RunE: func(cmd *cobra.Command, _ []string) error {
36-
telemetry.TrackCommand("debug", []string{"auth"})
37-
3836
ctx := cmd.Context()
37+
telemetry.TrackCommand(ctx, "debug", []string{"auth"})
38+
3939
w := cmd.OutOrStdout()
4040

4141
token := desktop.GetToken(ctx)

cmd/root/eval.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ func newEvalCmd() *cobra.Command {
5050
}
5151

5252
func (f *evalFlags) runEvalCommand(cmd *cobra.Command, args []string) error {
53-
telemetry.TrackCommand("eval", args)
53+
telemetry.TrackCommand(cmd.Context(), "eval", args)
5454

5555
ctx := cmd.Context()
5656
agentFilename := args[0]

cmd/root/mcp.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,9 @@ func newMCPCmd() *cobra.Command {
3939
}
4040

4141
func (f *mcpFlags) runMCPCommand(cmd *cobra.Command, args []string) error {
42-
telemetry.TrackCommand("serve", append([]string{"mcp"}, args...))
43-
4442
ctx := cmd.Context()
43+
telemetry.TrackCommand(ctx, "serve", append([]string{"mcp"}, args...))
44+
4545
agentFilename := args[0]
4646

4747
if !f.http {

cmd/root/new.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,8 @@ Optionally provide a description as an argument to skip the initial prompt.`,
5151
}
5252

5353
func (f *newFlags) runNewCommand(cmd *cobra.Command, args []string) error {
54-
telemetry.TrackCommand("new", args)
55-
5654
ctx := cmd.Context()
55+
telemetry.TrackCommand(ctx, "new", args)
5756

5857
t, err := creator.Agent(ctx, &f.runConfig, f.modelParam)
5958
if err != nil {

cmd/root/pull.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,9 @@ func newPullCmd() *cobra.Command {
3535
}
3636

3737
func (f *pullFlags) runPullCommand(cmd *cobra.Command, args []string) error {
38-
telemetry.TrackCommand("share", append([]string{"pull"}, args...))
39-
4038
ctx := cmd.Context()
39+
telemetry.TrackCommand(ctx, "share", append([]string{"pull"}, args...))
40+
4141
out := cli.NewPrinter(cmd.OutOrStdout())
4242
registryRef := args[0]
4343
slog.Debug("Starting pull", "registry_ref", registryRef)

0 commit comments

Comments
 (0)