Skip to content

Commit b40aaf4

Browse files
committed
Fixes microsoft#29742: Add telemetry event for task customization
1 parent 0626287 commit b40aaf4

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

src/vs/workbench/parts/tasks/electron-browser/task.contribution.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -524,12 +524,18 @@ interface WorkspaceConfigurationResult {
524524
hasErrors: boolean;
525525
}
526526

527+
interface TaskCustomizationTelementryEvent {
528+
properties: string[];
529+
}
530+
527531
class TaskService extends EventEmitter implements ITaskService {
528532

529533
// private static autoDetectTelemetryName: string = 'taskServer.autoDetect';
530534
private static RecentlyUsedTasks_Key = 'workbench.tasks.recentlyUsedTasks';
531535
private static RanTaskBefore_Key = 'workbench.tasks.ranTaskBefore';
532536

537+
private static CustomizationTelemetryEventName: string = 'taskService.customize';
538+
533539
public _serviceBrand: any;
534540
public static SERVICE_ID: string = 'taskService';
535541
public static OutputChannelId: string = 'tasks';
@@ -901,6 +907,10 @@ class TaskService extends EventEmitter implements ITaskService {
901907
promise = this.configurationEditingService.writeConfiguration(ConfigurationTarget.WORKSPACE, value);
902908
};
903909
return promise.then(() => {
910+
let event: TaskCustomizationTelementryEvent = {
911+
properties: properties ? Object.getOwnPropertyNames(properties) : []
912+
};
913+
this.telemetryService.publicLog(TaskService.CustomizationTelemetryEventName, event);
904914
if (openConfig) {
905915
let resource = this.contextService.toResource('.vscode/tasks.json'); // TODO@Dirk (https://github.com/Microsoft/vscode/issues/29454)
906916
this.editorService.openEditor({

0 commit comments

Comments
 (0)