@@ -400,7 +400,7 @@ func Run(options ...RunOption) {
400
400
401
401
if ! opts .RunGP && ! cfg .isDebugWorkspace () {
402
402
wg .Add (1 )
403
- go socketActivationForDocker (ctx , & wg , termMux )
403
+ go socketActivationForDocker (ctx , & wg , termMux , cfg , telemetry )
404
404
}
405
405
406
406
if cfg .isHeadless () {
@@ -1499,7 +1499,7 @@ func recordInitializerMetrics(path string, metrics *metrics.SupervisorMetrics) {
1499
1499
}
1500
1500
}
1501
1501
1502
- func socketActivationForDocker (ctx context.Context , wg * sync.WaitGroup , term * terminal.Mux ) {
1502
+ func socketActivationForDocker (ctx context.Context , wg * sync.WaitGroup , term * terminal.Mux , cfg * Config , w analytics. Writer ) {
1503
1503
defer wg .Done ()
1504
1504
1505
1505
fn := "/var/run/docker.sock"
@@ -1527,6 +1527,20 @@ func socketActivationForDocker(ctx context.Context, wg *sync.WaitGroup, term *te
1527
1527
},
1528
1528
LogToStdout : true ,
1529
1529
})
1530
+ outcome := "success"
1531
+ if err != nil {
1532
+ outcome = "failure"
1533
+ }
1534
+ w .Track (analytics.TrackMessage {
1535
+ Identity : analytics.Identity {UserID : cfg .OwnerId },
1536
+ Event : "gitpod_activate_docker" ,
1537
+ Properties : map [string ]interface {}{
1538
+ "instanceId" : cfg .WorkspaceInstanceID ,
1539
+ "workspaceId" : cfg .WorkspaceID ,
1540
+ "outcome" : outcome ,
1541
+ "debugWorkspace" : cfg .isDebugWorkspace (),
1542
+ },
1543
+ })
1530
1544
if err != nil {
1531
1545
return err
1532
1546
}
0 commit comments