Skip to content

Commit

Permalink
adding gdpr comments for owned events (microsoft#148595)
Browse files Browse the repository at this point in the history
  • Loading branch information
sbatten authored May 2, 2022
1 parent 648f059 commit a164020
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 22 deletions.
16 changes: 9 additions & 7 deletions src/vs/workbench/browser/layout.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2115,13 +2115,15 @@ export abstract class Layout extends Disposable implements IWorkbenchLayoutServi
};

type StartupLayoutEventClassification = {
activityBarVisible: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; isMeasurement: true };
sideBarVisible: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; isMeasurement: true };
auxiliaryBarVisible: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; isMeasurement: true };
panelVisible: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; isMeasurement: true };
statusbarVisible: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; isMeasurement: true };
sideBarPosition: { classification: 'SystemMetaData'; purpose: 'FeatureInsight' };
panelPosition: { classification: 'SystemMetaData'; purpose: 'FeatureInsight' };
owner: 'sbatten';
comment: 'Information about the layout of the workbench during statup';
activityBarVisible: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; isMeasurement: true; comment: 'Whether or the not the activity bar is visible' };
sideBarVisible: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; isMeasurement: true; comment: 'Whether or the not the primary side bar is visible' };
auxiliaryBarVisible: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; isMeasurement: true; comment: 'Whether or the not the secondary side bar is visible' };
panelVisible: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; isMeasurement: true; comment: 'Whether or the not the panel is visible' };
statusbarVisible: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; isMeasurement: true; comment: 'Whether or the not the status bar is visible' };
sideBarPosition: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; comment: 'Whether the primary side bar is on the left or right' };
panelPosition: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; comment: 'Whether the panel is on the bottom, left, or right' };
};

const layoutDescriptor: StartupLayoutEvent = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -761,7 +761,9 @@ class WorkspaceTrustTelemetryContribution extends Disposable implements IWorkben
const disabledByCliFlag = this.environmentService.disableWorkspaceTrust;

type WorkspaceTrustDisabledEventClassification = {
reason: { classification: 'SystemMetaData'; purpose: 'FeatureInsight' };
owner: 'sbatten';
comment: 'Logged when workspace trust is disabled';
reason: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; comment: 'The reason workspace trust is disabled. e.g. cli or setting' };
};

type WorkspaceTrustDisabledEvent = {
Expand All @@ -775,7 +777,9 @@ class WorkspaceTrustTelemetryContribution extends Disposable implements IWorkben
}

type WorkspaceTrustInfoEventClassification = {
trustedFoldersCount: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; isMeasurement: true };
owner: 'sbatten';
comment: 'Information about the workspaces trusted on the machine';
trustedFoldersCount: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; isMeasurement: true; comment: 'The number of trusted folders on the machine' };
};

type WorkspaceTrustInfoEvent = {
Expand All @@ -798,8 +802,10 @@ class WorkspaceTrustTelemetryContribution extends Disposable implements IWorkben
};

type WorkspaceTrustStateChangedEventClassification = {
workspaceId: { classification: 'SystemMetaData'; purpose: 'FeatureInsight' };
isTrusted: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; isMeasurement: true };
owner: 'sbatten';
comment: 'Logged when the workspace transitions between trusted and restricted modes';
workspaceId: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; comment: 'An id of the workspace' };
isTrusted: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; isMeasurement: true; comment: 'true if the workspace is trusted' };
};

this.telemetryService.publicLog2<WorkspaceTrustStateChangedEvent, WorkspaceTrustStateChangedEventClassification>('workspaceTrustStateChanged', {
Expand All @@ -809,9 +815,11 @@ class WorkspaceTrustTelemetryContribution extends Disposable implements IWorkben

if (isTrusted) {
type WorkspaceTrustFolderInfoEventClassification = {
trustedFolderDepth: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; isMeasurement: true };
workspaceFolderDepth: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; isMeasurement: true };
delta: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; isMeasurement: true };
owner: 'sbatten';
comment: 'Some metrics on the trusted workspaces folder structure';
trustedFolderDepth: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; isMeasurement: true; comment: 'The number of directories deep of the trusted path' };
workspaceFolderDepth: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; isMeasurement: true; comment: 'The number of directories deep of the workspace path' };
delta: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; isMeasurement: true; comment: 'The difference between the trusted path and the workspace path directories depth' };
};

type WorkspaceTrustFolderInfoEvent = {
Expand Down
10 changes: 7 additions & 3 deletions src/vs/workbench/services/assignment/common/assignmentService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,9 @@ class WorkbenchAssignmentServiceTelemetry implements IExperimentationTelemetry {

/* __GDPR__
"query-expfeature" : {
"ABExp.queriedFeature": { "classification": "SystemMetaData", "purpose": "FeatureInsight" }
"owner": "sbatten",
"comment": "Logs queries to the experiment service by feature for metric calculations",
"ABExp.queriedFeature": { "classification": "SystemMetaData", "purpose": "FeatureInsight", "comment": "The experimental feature being queried" }
}
*/
this.telemetryService.publicLog(eventName, data);
Expand Down Expand Up @@ -103,8 +105,10 @@ export class WorkbenchAssignmentService extends BaseAssignmentService {
};

type TASClientReadTreatmentClassification = {
treatmentValue: { classification: 'SystemMetaData'; purpose: 'PerformanceAndHealth' };
treatmentName: { classification: 'SystemMetaData'; purpose: 'PerformanceAndHealth' };
owner: 'sbatten';
comment: 'Logged when a treatment value is read from the experiment service';
treatmentValue: { classification: 'SystemMetaData'; purpose: 'PerformanceAndHealth'; comment: 'The value of the read treatment' };
treatmentName: { classification: 'SystemMetaData'; purpose: 'PerformanceAndHealth'; comment: 'The name of the treatment that was read' };
};

this.telemetryService.publicLog2<TASClientReadTreatmentData, TASClientReadTreatmentClassification>('tasClientReadTreatmentComplete',
Expand Down
12 changes: 7 additions & 5 deletions src/vs/workbench/services/views/browser/viewDescriptorService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -439,11 +439,13 @@ export class ViewDescriptorService extends Disposable implements IViewDescriptor
}

type ViewDescriptorServiceMoveViewsClassification = {
viewCount: { classification: 'SystemMetaData'; purpose: 'FeatureInsight' };
fromContainer: { classification: 'SystemMetaData'; purpose: 'FeatureInsight' };
toContainer: { classification: 'SystemMetaData'; purpose: 'FeatureInsight' };
fromLocation: { classification: 'SystemMetaData'; purpose: 'FeatureInsight' };
toLocation: { classification: 'SystemMetaData'; purpose: 'FeatureInsight' };
owner: 'sbatten';
comment: 'Logged when views are moved from one view container to another';
viewCount: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; comment: 'The number of views moved' };
fromContainer: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; comment: 'The starting view container of the moved views' };
toContainer: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; comment: 'The destination view container of the moved views' };
fromLocation: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; comment: 'The location of the starting view container. e.g. Primary Side Bar' };
toLocation: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; comment: 'The location of the destination view container. e.g. Panel' };
};

this.telemetryService.publicLog2<ViewDescriptorServiceMoveViewsEvent, ViewDescriptorServiceMoveViewsClassification>('viewDescriptorService.moveViews', { viewCount, fromContainer, toContainer, fromLocation, toLocation });
Expand Down

0 comments on commit a164020

Please sign in to comment.