Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding GDPR annotations #34997

Merged
merged 39 commits into from
Sep 26, 2017
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
72dfa6c
classify common properties
kieferrm Sep 4, 2017
858d465
first batch events
kieferrm Sep 4, 2017
02b6db0
gdpr tooling
kieferrm Sep 4, 2017
94667ec
update snippets
kieferrm Sep 5, 2017
8671fe5
parse source comments
kieferrm Sep 6, 2017
d1e4c64
fix GDPR value
kieferrm Sep 7, 2017
0be8478
remove unused files
kieferrm Sep 7, 2017
cc1255c
more GDPR classification
kieferrm Sep 8, 2017
370f1e7
fix typo
kieferrm Sep 8, 2017
b059271
fix typo
kieferrm Sep 8, 2017
d821c08
fix typo
kieferrm Sep 8, 2017
ca8b412
more GDPR classification
kieferrm Sep 8, 2017
c28edb3
more GDPR classification
kieferrm Sep 8, 2017
7ee4c75
correct typos
kieferrm Sep 8, 2017
e1c04e5
more GDPR classification
kieferrm Sep 8, 2017
fb2da69
correct typos
kieferrm Sep 8, 2017
4f873b7
correct property names
kieferrm Sep 8, 2017
d54487e
replace invalid value
kieferrm Sep 8, 2017
fcd85f4
inline values
kieferrm Sep 9, 2017
f885522
change wildcard property
kieferrm Sep 12, 2017
1d7b0a2
use wildcard for files.joined
kieferrm Sep 12, 2017
f691cfe
classification for TS extension
kieferrm Sep 18, 2017
9cceab0
gdpr classification for markdown extension
kieferrm Sep 18, 2017
47000c3
GDPR classification for git extension
kieferrm Sep 19, 2017
f0e9b12
GDPR classification for save participants
kieferrm Sep 19, 2017
b4c594a
GDPR classify timer2 on IStartupMetrics
kieferrm Sep 19, 2017
da1fc46
review GDPR classifications
kieferrm Sep 19, 2017
8550b03
correct wildcard usage
kieferrm Sep 19, 2017
dca73b7
omit endPoint where it defaults to none
kieferrm Sep 20, 2017
15e6a82
GDPR comments
kieferrm Sep 23, 2017
8d48ed8
update GDPR todos
kieferrm Sep 25, 2017
146f868
fixing classification
kieferrm Sep 25, 2017
d5604cf
update extension install, update and uninstall events
kieferrm Sep 25, 2017
905eca3
add description for new common property
kieferrm Sep 25, 2017
15a5efc
formatting change
kieferrm Sep 25, 2017
3c70c36
indentation changes
kieferrm Sep 25, 2017
955adbf
add missing commas
kieferrm Sep 26, 2017
5aa3360
fix typos
kieferrm Sep 26, 2017
112f9a5
fix searchResultsShown event
kieferrm Sep 26, 2017
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
more GDPR classification
  • Loading branch information
kieferrm committed Sep 25, 2017
commit c28edb31e37fd647dce763f65ad7ce2a3133c03d
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,11 @@ export class UserSettingsRenderer extends Disposable implements IPreferencesRend
}

public updatePreference(key: string, value: any, source: ISetting): void {
/* __GDPR__
"defaultSettingsActions.copySetting" : {
"userConfigurationKeys" : { "endPoint": "none", "classification": "SystemMetaData", "purpose": "FeatureInsight" }
}
*/
this.telemetryService.publicLog('defaultSettingsActions.copySetting', { userConfigurationKeys: [key] });
const overrideIdentifier = source.overrideOf ? overrideIdentifierFromKey(source.overrideOf.key) : null;
const resource = this.preferencesModel.uri;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,11 @@ export class PreferencesService extends Disposable implements IPreferencesServic
}

openGlobalKeybindingSettings(textual: boolean): TPromise<void> {
/* __GDPR__
"openKeybindings" : {
"textual" : { "endPoint": "none", "classification": "SystemMetaData", "purpose": "FeatureInsight" }
}
*/
this.telemetryService.publicLog('openKeybindings', { textual });
if (textual) {
const emptyContents = '// ' + nls.localize('emptyKeybindingsHeader', "Place your key bindings in this file to overwrite the defaults") + '\n[\n]';
Expand Down
6 changes: 6 additions & 0 deletions src/vs/workbench/parts/quickopen/browser/commandsHandler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -297,6 +297,12 @@ abstract class BaseCommandEntry extends QuickOpenEntryGroup {
TPromise.timeout(50).done(() => {
if (action && (!(action instanceof Action) || action.enabled)) {
try {
/* __GDPR__
"workbenchActionExecuted" : {
"id" : { "endPoint": "none", "classification": "SystemMetaData", "purpose": "FeatureInsight" },
"from": { "endPoint": "none", "classification": "SystemMetaData", "purpose": "FeatureInsight" }
}
*/
this.telemetryService.publicLog('workbenchActionExecuted', { id: action.id, from: 'quick open' });
(action.run() || TPromise.as(null)).done(() => {
if (action instanceof Action) {
Expand Down
18 changes: 18 additions & 0 deletions src/vs/workbench/parts/search/browser/openAnythingHandler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,16 @@ interface ISearchWithRange {
range: IRange;
}

/* __GDPR__FRAGMENT__
"ITimerEventData" : {
"searchLength" : { "endPoint": "none", "classification": "SystemMetaData", "purpose": "PerformanceAndHealth" },
"unsortedResultDuration": { "endPoint": "none", "classification": "SystemMetaData", "purpose": "PerformanceAndHealth" },
"sortedResultDuration": { "endPoint": "none", "classification": "SystemMetaData", "purpose": "PerformanceAndHealth" },
"resultCount": { "endPoint": "none", "classification": "SystemMetaData", "purpose": "PerformanceAndHealth" },
"symbols": { "endPoint": "none", "classification": "SystemMetaData", "purpose": "PerformanceAndHealth" },
"files": { "endPoint": "none", "classification": "SystemMetaData", "purpose": "PerformanceAndHealth" }
}
*/
interface ITimerEventData {
searchLength: number;
unsortedResultDuration: number;
Expand Down Expand Up @@ -209,6 +219,14 @@ export class OpenAnythingHandler extends QuickOpenHandler {
files: fileModel.stats,
});

/* __GDPR__
"openAnything" : {
"duration" : { "endPoint": "none", "classification": "SystemMetaData", "purpose": "PerformanceAndHealth" },
"${include}": [
"${ITimerEventData}"
]
}
*/
this.telemetryService.publicLog('openAnything', objects.assign(data, { duration }));
});

Expand Down
6 changes: 6 additions & 0 deletions src/vs/workbench/parts/search/browser/patternInputWidget.ts
Original file line number Diff line number Diff line change
Expand Up @@ -241,6 +241,9 @@ export class ExcludePatternInputWidget extends PatternInputWidget {
title: nls.localize('useIgnoreFilesDescription', "Use Ignore Files"),
isChecked: false,
onChange: (viaKeyboard) => {
/* __GDPR__
"search.useIgnoreFiles.toggled" : {}
*/
this.telemetryService.publicLog('search.useIgnoreFiles.toggled');
this.onOptionChange(null);
if (!viaKeyboard) {
Expand All @@ -255,6 +258,9 @@ export class ExcludePatternInputWidget extends PatternInputWidget {
title: nls.localize('useExcludeSettingsDescription', "Use Exclude Settings"),
isChecked: false,
onChange: (viaKeyboard) => {
/* __GDPR__
"search.useExcludeSettings.toggled" : {}
*/
this.telemetryService.publicLog('search.useExcludeSettings.toggled');
this.onOptionChange(null);
if (!viaKeyboard) {
Expand Down
3 changes: 3 additions & 0 deletions src/vs/workbench/parts/search/browser/replaceService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,9 @@ export class ReplaceService implements IReplaceService {
}

public openReplacePreview(element: FileMatchOrMatch, preserveFocus?: boolean, sideBySide?: boolean, pinned?: boolean): TPromise<any> {
/* __GDPR__
"replace.open.previewEditor" : {}
*/
this.telemetryService.publicLog('replace.open.previewEditor');
const fileMatch = element instanceof Match ? element.parent() : element;

Expand Down
6 changes: 6 additions & 0 deletions src/vs/workbench/parts/search/browser/searchActions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -549,6 +549,9 @@ export class ReplaceAllAction extends AbstractSearchAndReplaceAction {
}

public run(): TPromise<any> {
/* __GDPR__
"replaceAll.action.selected" : {}
*/
this.telemetryService.publicLog('replaceAll.action.selected');
let nextFocusElement = this.getElementToFocusAfterRemoved(this.viewer, this.fileMatch);
return this.fileMatch.parent().replace(this.fileMatch).then(() => {
Expand All @@ -573,6 +576,9 @@ export class ReplaceAction extends AbstractSearchAndReplaceAction {

public run(): TPromise<any> {
this.enabled = false;
/* __GDPR__
"replace.action.selected" : {}
*/
this.telemetryService.publicLog('replace.action.selected');

return this.element.parent().replace(this.element).then(() => {
Expand Down
6 changes: 6 additions & 0 deletions src/vs/workbench/parts/search/browser/searchViewlet.ts
Original file line number Diff line number Diff line change
Expand Up @@ -853,6 +853,9 @@ export class SearchViewlet extends Viewlet {
}

public toggleQueryDetails(moveFocus?: boolean, show?: boolean, skipLayout?: boolean, reverse?: boolean): void {
/* __GDPR__
"search.toggleQueryDetails" : {}
*/
this.telemetryService.publicLog('search.toggleQueryDetails');

let cls = 'more';
Expand Down Expand Up @@ -1329,6 +1332,9 @@ export class SearchViewlet extends Viewlet {
return TPromise.as(true);
}

/* __GDPR__
"searchResultChosen" : {}
*/
this.telemetryService.publicLog('searchResultChosen');

return (this.viewModel.isReplaceActive() && !!this.viewModel.replaceString) ?
Expand Down
24 changes: 24 additions & 0 deletions src/vs/workbench/parts/search/common/searchModel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -568,6 +568,11 @@ export class SearchResult extends Disposable {

const promise = this.replaceService.replace(this.matches(), progressRunner);
const onDone = stopwatch(fromPromise(promise));
/* __GDPR__
"replaceAll.started" : {
"duration" : { "endPoint": "none", "classification": "SystemMetaData", "purpose": "PerformanceAndHealth" }
}
*/
onDone(duration => this.telemetryService.publicLog('replaceAll.started', { duration }));

return promise.then(() => {
Expand Down Expand Up @@ -725,11 +730,21 @@ export class SearchModel extends Disposable {
const progressEmitter = new Emitter<void>();
const onFirstRender = any(onDone, progressEmitter.event);
const onFirstRenderStopwatch = stopwatch(onFirstRender);
/* __GDPR__
"searchResultsFirstRender" : {
"duration" : { "endPoint": "none", "classification": "SystemMetaData", "purpose": "PerformanceAndHealth" }
}
*/
onFirstRenderStopwatch(duration => this.telemetryService.publicLog('searchResultsFirstRender', { duration }));

const onDoneStopwatch = stopwatch(onDone);
const start = Date.now();

/* __GDPR__
"searchResultsFinished" : {
"duration" : { "endPoint": "none", "classification": "SystemMetaData", "purpose": "PerformanceAndHealth" }
}
*/
onDoneStopwatch(duration => this.telemetryService.publicLog('searchResultsFinished', { duration }));

const currentRequest = this.currentRequest;
Expand All @@ -754,6 +769,15 @@ export class SearchModel extends Disposable {
}
const options: IPatternInfo = objects.assign({}, this._searchQuery.contentPattern);
delete options.pattern;
/* __GDPR__
"searchresultsShown" : {
"count" : { "endPoint": "none", "classification": "SystemMetaData", "purpose": "FeatureInsight" },
"fileCount": { "endPoint": "none", "classification": "SystemMetaData", "purpose": "FeatureInsight" },
"options": { "endPoint": "none", "classification": "SystemMetaData", "purpose": "FeatureInsight" },
"duration": { "endPoint": "none", "classification": "SystemMetaData", "purpose": "PerformanceAndHealth" },
"useRipgrep": { "endPoint": "none", "classification": "SystemMetaData", "purpose": "FeatureInsight" }
}
*/
this.telemetryService.publicLog('searchResultsShown', {
count: this._searchResult.count(),
fileCount: this._searchResult.fileCount(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ class LanguageSurvey {
const message = nls.localize('helpUs', "Help us improve our support for {0}", data.languageId);

const takeSurveyAction = new Action('takeSurvey', nls.localize('takeShortSurvey', "Take Short Survey"), '', true, () => {
// GDPR_TODO need to move away from dynamic event names as those cannot be registered statically
telemetryService.publicLog(`${data.surveyId}.survey/takeShortSurvey`);
return telemetryService.getTelemetryInfo().then(info => {
window.open(`${data.surveyUrl}?o=${encodeURIComponent(process.platform)}&v=${encodeURIComponent(pkg.version)}&m=${encodeURIComponent(info.machineId)}`);
Expand All @@ -97,19 +98,22 @@ class LanguageSurvey {
});

const remindMeLaterAction = new Action('later', nls.localize('remindLater', "Remind Me later"), '', true, () => {
// GDPR_TODO need to move away from dynamic event names as those cannot be registered statically
telemetryService.publicLog(`${data.surveyId}.survey/remindMeLater`);
storageService.store(SESSION_COUNT_KEY, sessionCount - 3, StorageScope.GLOBAL);
return TPromise.as(null);
});

const neverAgainAction = new Action('never', nls.localize('neverAgain', "Don't Show Again"), '', true, () => {
// GDPR_TODO need to move away from dynamic event names as those cannot be registered statically
telemetryService.publicLog(`${data.surveyId}.survey/dontShowAgain`);
storageService.store(IS_CANDIDATE_KEY, false, StorageScope.GLOBAL);
storageService.store(SKIP_VERSION_KEY, pkg.version, StorageScope.GLOBAL);
return TPromise.as(null);
});

const actions = [neverAgainAction, remindMeLaterAction, takeSurveyAction];
// GDPR_TODO need to move away from dynamic event names as those cannot be registered statically
telemetryService.publicLog(`${data.surveyId}.survey/userAsked`);
messageService.show(Severity.Info, { message, actions });
}
Expand Down
10 changes: 10 additions & 0 deletions src/vs/workbench/parts/tasks/common/taskSystem.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,16 @@ export class TaskError {
}
}

/* __GDPR__FRAGMENT__
"TelemetryEvent" : {
"trigger" : { "endPoint": "none", "classification": "SystemMetaData", "purpose": "FeatureInsight" },
"runner": { "endPoint": "none", "classification": "SystemMetaData", "purpose": "FeatureInsight" },
"taskKind": { "endPoint": "none", "classification": "SystemMetaData", "purpose": "FeatureInsight" },
"command": { "endPoint": "none", "classification": "SystemMetaData", "purpose": "FeatureInsight" },
"success": { "endPoint": "none", "classification": "SystemMetaData", "purpose": "FeatureInsight" },
"exitCode": { "endPoint": "none", "classification": "SystemMetaData", "purpose": "FeatureInsight" }
}
*/
export interface TelemetryEvent {
// How the task got trigger. Is either shortcut or command
trigger: string;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1098,6 +1098,11 @@ class TaskService extends EventEmitter implements ITaskService {
let event: TaskCustomizationTelementryEvent = {
properties: properties ? Object.getOwnPropertyNames(properties) : []
};
/* __GDPR__
"taskService.customize" : {
"properties" : { "endPoint": "none", "classification": "SystemMetaData", "purpose": "FeatureInsight" }
}
*/
this.telemetryService.publicLog(TaskService.CustomizationTelemetryEventName, event);
if (openConfig) {
let resource = workspaceFolder.toResource('.vscode/tasks.json');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -410,6 +410,13 @@ export class TerminalTaskSystem extends EventEmitter implements ITaskSystem {
success: true,
exitCode: summary.exitCode
};
/* __GDPR__
"taskService" : {
"${include}": [
"${TelemetryEvent}"
]
}
*/
this.telemetryService.publicLog(TerminalTaskSystem.TelemetryEventName, telemetryEvent);
} catch (error) {
}
Expand All @@ -423,6 +430,13 @@ export class TerminalTaskSystem extends EventEmitter implements ITaskSystem {
command: this.getSanitizedCommand(executedCommand),
success: false
};
/* __GDPR__
"taskService" : {
"${include}": [
"${TelemetryEvent}"
]
}
*/
this.telemetryService.publicLog(TerminalTaskSystem.TelemetryEventName, telemetryEvent);
} catch (error) {
}
Expand Down
21 changes: 21 additions & 0 deletions src/vs/workbench/parts/tasks/node/processTaskSystem.ts
Original file line number Diff line number Diff line change
Expand Up @@ -146,16 +146,37 @@ export class ProcessTaskSystem extends EventEmitter implements ITaskSystem {
try {
let result = this.doExecuteTask(task, telemetryEvent);
result.promise = result.promise.then((success) => {
/* __GDPR__
"taskService" : {
"${include}": [
"${TelemetryEvent}"
]
}
*/
this.telemetryService.publicLog(ProcessTaskSystem.TelemetryEventName, telemetryEvent);
return success;
}, (err: any) => {
telemetryEvent.success = false;
/* __GDPR__
"taskService" : {
"${include}": [
"${TelemetryEvent}"
]
}
*/
this.telemetryService.publicLog(ProcessTaskSystem.TelemetryEventName, telemetryEvent);
return TPromise.wrapError<ITaskSummary>(err);
});
return result;
} catch (err) {
telemetryEvent.success = false;
/* __GDPR__
"taskService" : {
"${include}": [
"${TelemetryEvent}"
]
}
*/
this.telemetryService.publicLog(ProcessTaskSystem.TelemetryEventName, telemetryEvent);
if (err instanceof TaskError) {
throw err;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,26 +70,38 @@ class UnsupportedWorkspaceSettingsContribution implements IWorkbenchContribution
const message = nls.localize('unsupportedWorkspaceSettings', 'This Workspace contains settings that can only be set in User Settings. ({0})', unsupportedKeys.join(', '));

const openWorkspaceSettings = new Action('unsupportedWorkspaceSettings.openWorkspaceSettings', nls.localize('openWorkspaceSettings', 'Open Workspace Settings'), '', true, () => {
/* __GDPR__
"workspace.settings.unsupported.review" : {}
*/
this.telemetryService.publicLog('workspace.settings.unsupported.review');
this.rememberWarningWasShown();
return this.preferencesService.openWorkspaceSettings();
});

const openDocumentation = new Action('unsupportedWorkspaceSettings.openDocumentation', nls.localize('openDocumentation', 'Learn More'), '', true, () => {
/* __GDPR__
"workspace.settings.unsupported.documentation" : {}
*/
this.telemetryService.publicLog('workspace.settings.unsupported.documentation');
this.rememberWarningWasShown();
window.open('https://go.microsoft.com/fwlink/?linkid=839878'); // Don't change link.
return TPromise.as(true);
});

const close = new Action('unsupportedWorkspaceSettings.Ignore', nls.localize('ignore', 'Ignore'), '', true, () => {
/* __GDPR__
"workspace.settings.unsupported.ignore" : {}
*/
this.telemetryService.publicLog('workspace.settings.unsupported.ignore');
this.rememberWarningWasShown();
return TPromise.as(true);
});

const actions = [openWorkspaceSettings, openDocumentation, close];
this.messageService.show(Severity.Warning, { message, actions });
/* __GDPR__
"workspace.settings.unsupported.warning" : {}
*/
this.telemetryService.publicLog('workspace.settings.unsupported.warning');
}
}
Expand Down
Loading