mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 10:58:30 -05:00
add telemetry on how many projects are open (#19146)
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
"name": "data-workspace",
|
||||
"displayName": "Data Workspace",
|
||||
"description": "Additional common functionality for database projects",
|
||||
"version": "0.2.0",
|
||||
"version": "0.2.1",
|
||||
"publisher": "Microsoft",
|
||||
"preview": true,
|
||||
"license": "https://raw.githubusercontent.com/Microsoft/azuredatastudio/main/LICENSE.txt",
|
||||
|
||||
@@ -26,8 +26,8 @@ export enum TelemetryActions {
|
||||
ProjectRemovedFromWorkspace = 'ProjectRemovedFromWorkspace',
|
||||
OpeningProject = 'OpeningProject',
|
||||
NewProjectDialogLaunched = 'NewProjectDialogLaunched',
|
||||
OpeningWorkspace = 'OpeningWorkspace',
|
||||
OpenExistingDialogLaunched = 'OpenExistingDialogLaunched',
|
||||
NewProjectDialogCompleted = 'NewProjectDialogCompleted',
|
||||
GitClone = 'GitClone'
|
||||
GitClone = 'GitClone',
|
||||
ProjectsLoaded = 'ProjectsLoaded'
|
||||
}
|
||||
|
||||
@@ -24,9 +24,16 @@ export class WorkspaceService implements IWorkspaceService {
|
||||
readonly onDidWorkspaceProjectsChange: vscode.Event<void> = this._onDidWorkspaceProjectsChange?.event;
|
||||
|
||||
private openedProjects: vscode.Uri[] | undefined = undefined;
|
||||
private excludedProjects: string[] | undefined;
|
||||
|
||||
constructor() {
|
||||
this.getProjectsInWorkspace(undefined, true).catch(err => console.error('Error initializing projects in workspace ', err));
|
||||
|
||||
TelemetryReporter.createActionEvent(TelemetryViews.WorkspaceTreePane, TelemetryActions.ProjectsLoaded)
|
||||
.withAdditionalProperties({
|
||||
openProjectCount: this.openedProjects?.length.toString() ?? '0',
|
||||
exludedProjectCount: this.excludedProjects?.length.toString() ?? '0'
|
||||
}).send();
|
||||
}
|
||||
|
||||
get isProjectProviderAvailable(): boolean {
|
||||
@@ -137,8 +144,8 @@ export class WorkspaceService implements IWorkspaceService {
|
||||
}
|
||||
|
||||
// remove excluded projects specified in workspace file
|
||||
const excludedProjects = this.getWorkspaceConfigurationValue<string[]>(ExcludedProjectsConfigurationName);
|
||||
this.openedProjects = this.openedProjects.filter(project => !excludedProjects.find(excludedProject => excludedProject === vscode.workspace.asRelativePath(project)));
|
||||
this.excludedProjects = this.getWorkspaceConfigurationValue<string[]>(ExcludedProjectsConfigurationName);
|
||||
this.openedProjects = this.openedProjects.filter(project => !this.excludedProjects?.find(excludedProject => excludedProject === vscode.workspace.asRelativePath(project)));
|
||||
|
||||
// filter by specified extension
|
||||
if (ext) {
|
||||
|
||||
Reference in New Issue
Block a user