Split event into multiple

This commit is contained in:
Daniel Imms
2019-09-25 14:55:58 -07:00
parent f45aa1fc1c
commit ac7bbceba5
3 changed files with 27 additions and 7 deletions

View File

@@ -164,16 +164,18 @@ export class WorkspaceStats implements IWorkbenchContribution {
this.reportProxyStats();
const diagnosticsChannel = this.sharedProcessService.getChannel('diagnostics');
diagnosticsChannel.call('reportWorkspaceStats', this.getWorkspaceInformation());
this.getWorkspaceInformation().then(stats => diagnosticsChannel.call('reportWorkspaceStats', stats));
}
private getWorkspaceInformation(): IWorkspaceInformation {
private async getWorkspaceInformation(): Promise<IWorkspaceInformation> {
const workspace = this.contextService.getWorkspace();
const state = this.contextService.getWorkbenchState();
const id = this.workspaceStatsService.getTelemetryWorkspaceId(workspace, state);
const telemetryId = this.workspaceStatsService.getTelemetryWorkspaceId(workspace, state);
const rendererSessionId = (await this.telemetryService.getTelemetryInfo()).sessionId;
return {
id: workspace.id,
telemetryId: id,
telemetryId,
rendererSessionId,
folders: workspace.folders,
configuration: workspace.configuration
};