@@ -19,7 +19,7 @@ import * as WebSocket from 'ws';
19
19
import { ConsoleLogger , listen as doListen } from 'vscode-ws-jsonrpc' ;
20
20
import * as grpc from '@grpc/grpc-js' ;
21
21
import * as util from 'util' ;
22
- import { mixin } from 'vs/base/common/objects' ;
22
+ import { filter , mixin } from 'vs/base/common/objects' ;
23
23
24
24
class SupervisorConnection {
25
25
readonly deadlines = {
@@ -161,9 +161,10 @@ export class GitpodInsightsAppender implements ITelemetryAppender {
161
161
this . _withAIClient ( ( aiClient ) => {
162
162
data = mixin ( data , this . _defaultData ) ;
163
163
data = validateTelemetryData ( data ) ;
164
- const gitpodTrackEvent = mapTelemetryData ( eventName , data . properties ) ;
165
- if ( gitpodTrackEvent ) {
166
- aiClient . trackEvent ( gitpodTrackEvent ) ;
164
+ const mappedEvent = mapTelemetryData ( eventName , data . properties ) ;
165
+ if ( mappedEvent ) {
166
+ mappedEvent . properties = filter ( mappedEvent . properties , ( _ , v ) => v !== undefined && v !== null ) ;
167
+ aiClient . trackEvent ( mappedEvent ) ;
167
168
}
168
169
} ) ;
169
170
}
@@ -328,6 +329,33 @@ function mapTelemetryData(eventName: string, data: any): RemoteTrackMessage | un
328
329
timestamp : data . timestamp
329
330
} ,
330
331
} ;
332
+ case 'gettingStarted.ActionExecuted' :
333
+ return {
334
+ event : 'vscode_getting_started' ,
335
+ properties : {
336
+ kind : 'action_executed' ,
337
+ command : data . command ,
338
+ argument : data . argument ,
339
+ workspaceId : data . workspaceId ,
340
+ workspaceInstanceId : data . workspaceInstanceId ,
341
+ sessionID : data . sessionID ,
342
+ timestamp : data . timestamp
343
+ } ,
344
+ } ;
345
+ case 'editorClosed' :
346
+ if ( ( < string > data . typeId ) !== 'workbench.editors.gettingStartedInput' ) {
347
+ return undefined ;
348
+ }
349
+ return {
350
+ event : 'vscode_getting_started' ,
351
+ properties : {
352
+ kind : 'editor_closed' ,
353
+ workspaceId : data . workspaceId ,
354
+ workspaceInstanceId : data . workspaceInstanceId ,
355
+ sessionID : data . sessionID ,
356
+ timestamp : data . timestamp
357
+ } ,
358
+ } ;
331
359
}
332
360
333
361
return undefined ;
0 commit comments