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 e1c04e573ff6b6139fb229eced8678617ebb63c1
13 changes: 13 additions & 0 deletions src/vs/base/parts/quickopen/browser/quickOpenWidget.ts
Original file line number Diff line number Diff line change
Expand Up @@ -532,6 +532,13 @@ export class QuickOpenWidget implements IModelProvider {
if (this.usageLogger) {
const indexOfAcceptedElement = this.model.entries.indexOf(value);
const entriesCount = this.model.entries.length;
/* __GDPR__
"quickOpenWidgetItemAccepted" : {
"index" : { "endPoint": "none", "classification": "SystemMetaData", "purpose": "FeatureInsight" },
"count": { "endPoint": "none", "classification": "SystemMetaData", "purpose": "FeatureInsight" },
"isQuickNavigate": { "endPoint": "none", "classification": "SystemMetaData", "purpose": "FeatureInsight" }
}
*/
this.usageLogger.publicLog('quickOpenWidgetItemAccepted', { index: indexOfAcceptedElement, count: entriesCount, isQuickNavigate: this.quickNavigateConfiguration ? true : false });
}

Expand Down Expand Up @@ -773,6 +780,12 @@ export class QuickOpenWidget implements IModelProvider {
if (this.model) {
const entriesCount = this.model.entries.filter(e => this.isElementVisible(this.model, e)).length;
if (this.usageLogger) {
/* __GDPR__
"quickOpenWidgetCancelled" : {
"count" : { "endPoint": "none", "classification": "SystemMetaData", "purpose": "FeatureInsight" },
"isQuickNavigate": { "endPoint": "none", "classification": "SystemMetaData", "purpose": "FeatureInsight" }
}
*/
this.usageLogger.publicLog('quickOpenWidgetCancelled', { count: entriesCount, isQuickNavigate: this.quickNavigateConfiguration ? true : false });
}
}
Expand Down
1 change: 1 addition & 0 deletions src/vs/code/electron-main/windows.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1572,6 +1572,7 @@ class FileDialog {

// Telemetry
if (options.telemetryEventName) {
// __GDPR__TODO
this.telemetryService.publicLog(options.telemetryEventName, {
...options.telemetryExtraData,
outcome: numberOfPaths ? 'success' : 'canceled',
Expand Down
9 changes: 9 additions & 0 deletions src/vs/editor/common/editorCommonExtensions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,15 @@ export abstract class EditorAction extends EditorCommand {
}

protected reportTelemetry(accessor: ServicesAccessor, editor: editorCommon.ICommonCodeEditor) {
/* __GDPR__
"editorActionInvoked" : {
"name" : { "endPoint": "none", "classification": "SystemMetaData", "purpose": "FeatureInsight" },
"id": { "endPoint": "none", "classification": "SystemMetaData", "purpose": "FeatureInsight" },
"${include}": [
"${EditorTelemetryData}"
]
}
*/
accessor.get(ITelemetryService).publicLog('editorActionInvoked', { name: this.label, id: this.id, ...editor.getTelemetryData() });
}

Expand Down
1 change: 1 addition & 0 deletions src/vs/platform/telemetry/browser/errorTelemetry.ts
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,7 @@ export default class ErrorTelemetry {
"column": { "endPoint": "none", "classification": "SystemMetaData", "purpose": "PerformanceAndHealth" }
}
*/
// GDPR__TODO more properties are missing
this._telemetryService.publicLog('UnhandledError', error);
}
this._buffer.length = 0;
Expand Down
5 changes: 5 additions & 0 deletions src/vs/platform/telemetry/common/telemetryService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,11 @@ export class TelemetryService implements ITelemetryService {
if (this._configurationService) {
this._updateUserOptIn();
this._configurationService.onDidUpdateConfiguration(this._updateUserOptIn, this, this._disposables);
/* __GDPR__
"optInStatus" : {
"optIn" : { "endPoint": "none", "classification": "SystemMetaData", "purpose": "BusinessInsight" }
}
*/
this.publicLog('optInStatus', { optIn: this._userOptIn });
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ export class SaveParticipant implements ISaveParticipant {
"saveParticipantStats" : {
}
*/
// TODO: We need to move off dynamic property names as we can't declare them statically in the registry.
// GDPR__TODO: We need to move off dynamic property names as we can't declare them statically in the registry.
this._telemetryService.publicLog('saveParticipantStats', stats);
});
}
Expand Down
6 changes: 6 additions & 0 deletions src/vs/workbench/api/electron-browser/mainThreadTelemetry.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,12 @@ export class MainThreadTelemetry implements MainThreadTelemetryShape {
}

$publicLog(eventName: string, data: any = Object.create(null)): void {
/* __GDPR__FRAGMENT__
"MainThreadData" : {
"pluginHostTelemetry" : { "endPoint": "none", "classification": "SystemMetaData", "purpose": "FeatureInsight" }
}
*/

data[MainThreadTelemetry._name] = true;
this._telemetryService.publicLog(eventName, data);
}
Expand Down
19 changes: 19 additions & 0 deletions src/vs/workbench/api/node/extHost.api.impl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,15 @@ export function createApiFactory(
return undefined;
}
this._seen.add(apiName);
/* __GDPR__
"apiUsage" : {
"name" : { "endPoint": "none", "classification": "SystemMetaData", "purpose": "FeatureInsight" },
"extension": { "endPoint": "none", "classification": "SystemMetaData", "purpose": "FeatureInsight" },
"${include}": [
"${MainThreadData}"
]
}
*/
return mainThreadTelemetry.$publicLog('apiUsage', {
name: apiName,
extension: extension.id
Expand Down Expand Up @@ -494,6 +503,16 @@ export function createApiFactory(
return extHostSCM.getLastInputBox(extension);
},
createSourceControl(id: string, label: string, rootUri?: vscode.Uri) {
/* __GDPR__
"registerSCMProvider" : {
"extensionId" : { "endPoint": "none", "classification": "SystemMetaData", "purpose": "FeatureInsight" },
"providerId": { "endPoint": "none", "classification": "PublicNonPersonalData", "purpose": "FeatureInsight" },
"providerLabel": { "endPoint": "none", "classification": "PublicPersonalData", "purpose": "FeatureInsight" },
"${include}": [
"${MainThreadData}"
]
}
*/
mainThreadTelemetry.$publicLog('registerSCMProvider', {
extensionId: extension.id,
providerId: id,
Expand Down
7 changes: 7 additions & 0 deletions src/vs/workbench/api/node/extHostExtensionService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -281,6 +281,13 @@ export class ExtHostExtensionService implements ExtHostExtensionServiceShape {

private _doActivateExtension(extensionDescription: IExtensionDescription, startup: boolean): TPromise<ActivatedExtension> {
let event = getTelemetryActivationEvent(extensionDescription);
/* __GDPR__
"activatePlugin" : {
"${include}": [
"${TelemetryActivationEvent}"
]
}
*/
this._mainThreadTelemetry.$publicLog('activatePlugin', event);
if (!extensionDescription.main) {
// Treat the extension as being empty => NOT AN ERROR CASE
Expand Down
1 change: 1 addition & 0 deletions src/vs/workbench/api/node/extHostLanguageFeatures.ts
Original file line number Diff line number Diff line change
Expand Up @@ -880,6 +880,7 @@ export class ExtHostLanguageFeatures implements ExtHostLanguageFeaturesShape {
const handle = this._nextHandle();
this._adapter.set(handle, new HoverAdapter(this._documents, provider, once((name: string, data: any) => {
data['extension'] = extensionId;
// GDPR__TODO
this._telemetry.$publicLog(name, data);
})));
this._proxy.$registerHoverProvider(handle, selector);
Expand Down
9 changes: 9 additions & 0 deletions src/vs/workbench/api/node/extHostTextEditor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -595,6 +595,15 @@ export class ExtHostTextEditor2 extends ExtHostTextEditor {
for (const call of stackTrace) {
const extension = index.findSubstr(call.getFileName());
if (extension) {
/* __GDPR__
"usesCommandLink" : {
"extension" : { "endPoint": "none", "classification": "SystemMetaData", "purpose": "FeatureInsight" },
"from": { "endPoint": "none", "classification": "SystemMetaData", "purpose": "FeatureInsight" },
"${include}": [
"${MainThreadData}"
]
}
*/
this._mainThreadTelemetry.$publicLog('usesCommandLink', {
extension: extension.id,
from: 'decoration',
Expand Down
5 changes: 5 additions & 0 deletions src/vs/workbench/browser/parts/editor/editorPart.ts
Original file line number Diff line number Diff line change
Expand Up @@ -340,6 +340,11 @@ export class EditorPart extends Part implements IEditorPart, IEditorGroupService

// Opened to the side
if (position !== Position.ONE) {
/* __GDPR__
"workbenchSideEditorOpened" : {
"position" : { "endPoint": "none", "classification": "SystemMetaData", "purpose": "FeatureInsight" }
}
*/
this.telemetryService.publicLog('workbenchSideEditorOpened', { position: position });
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,7 @@ export class DebugService implements debug.IDebugService {
// only log telemetry events from debug adapter if the adapter provided the telemetry key
// and the user opted in telemetry
if (session.customTelemetryService && this.telemetryService.isOptedIn) {
// TODO Need to move off dynamic event names or properties. They cannot be registered upfront.
// GDPR__TODO Need to move off dynamic event names or properties. They cannot be registered upfront.
session.customTelemetryService.publicLog(event.body.output, event.body.data);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,16 +68,17 @@ export class KeymapExtensions implements IWorkbenchContribution {
}

private promptForDisablingOtherKeymaps(newKeymap: IExtensionStatus, oldKeymaps: IExtensionStatus[]): TPromise<void> {
const telemetryData: { [key: string]: any; } = {
newKeymap: newKeymap.identifier,
oldKeymaps: oldKeymaps.map(k => k.identifier)
};
/* __GDPR__FRAGMENT__
"KeyMapsData" : {
"newKeymap" : { "endPoint": "none", "classification": "SystemMetaData", "purpose": "FeatureInsight" },
"oldKeymaps": { "endPoint": "none", "classification": "SystemMetaData", "purpose": "FeatureInsight" }
}
*/
const telemetryData: { [key: string]: any; } = {
newKeymap: newKeymap.identifier,
oldKeymaps: oldKeymaps.map(k => k.identifier)
};

/* __GDPR__
"disableOtherKeymapsConfirmation" : {
"${include}": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -521,9 +521,9 @@ export class KeybindingsEditor extends BaseEditor implements IKeybindingsEditor
emptyFilters: this.getLatestEmptyFiltersForTelemetry()
};
this.latestEmptyFilters = [];
// TODO need to move off dynamic properties as they cannot be statically registered
/* __GDPR__
"keybindings.filter" : {
"filter": { "endPoint": "none", "classification": "CustomerContent", "purpose": "FeatureInsight" }
"emptyFilters" : { "endPoint": "none", "classification": "SystemMetaData", "purpose": "FeatureInsight" }
}
*/
Expand All @@ -541,7 +541,7 @@ export class KeybindingsEditor extends BaseEditor implements IKeybindingsEditor
}

private reportKeybindingAction(action: string, command: string, keybinding: ResolvedKeybinding | string): void {
// TODO need to move off dynamic event names and properties as they cannot be registered statically
// GDPR__TODO need to move off dynamic event names and properties as they cannot be registered statically
this.telemetryService.publicLog(action, { command, keybinding: keybinding ? (typeof keybinding === 'string' ? keybinding : keybinding.getUserSettingsLabel()) : '' });
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -323,9 +323,9 @@ export class PreferencesEditor extends BaseEditor {
emptyFilters: this.getLatestEmptyFiltersForTelemetry()
};
this.latestEmptyFilters = [];
// TODO need to move off dynamic properties as they cannot be statically be registered
/* __GDPR__
"defaultSettings.filter" : {
"filter": { "endPoint": "none", "classification": "SystemMetaData", "purpose": "FeatureInsight" }
"emptyFilters" : { "endPoint": "none", "classification": "SystemMetaData", "purpose": "FeatureInsight" }
}
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +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
// __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 @@ -98,22 +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
// __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
// __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
// __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
Loading