From c6ac991a52fd19f0c7712439eb0300febfdaf788 Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Wed, 11 Oct 2017 15:40:35 +0200 Subject: [PATCH] debt - remove apiUsage telemetry --- src/vs/workbench/api/node/extHost.api.impl.ts | 45 ------------------- .../api/node/extHostLanguageFeatures.ts | 4 +- 2 files changed, 1 insertion(+), 48 deletions(-) diff --git a/src/vs/workbench/api/node/extHost.api.impl.ts b/src/vs/workbench/api/node/extHost.api.impl.ts index 87c5a26ce68..0df38e8773f 100644 --- a/src/vs/workbench/api/node/extHost.api.impl.ts +++ b/src/vs/workbench/api/node/extHost.api.impl.ts @@ -81,8 +81,6 @@ export function createApiFactory( extensionService: ExtHostExtensionService ): IExtensionApiFactory { - const mainThreadTelemetry = threadService.get(MainContext.MainThreadTelemetry); - // Addressable instances const extHostHeapService = threadService.set(ExtHostContext.ExtHostHeapService, new ExtHostHeapService()); const extHostDocumentsAndEditors = threadService.set(ExtHostContext.ExtHostDocumentsAndEditors, new ExtHostDocumentsAndEditors(threadService)); @@ -140,29 +138,6 @@ export function createApiFactory( } } - const apiUsage = new class { - private _seen = new Set(); - publicLog(apiName: string) { - if (this._seen.has(apiName)) { - return undefined; - } - this._seen.add(apiName); - /* __GDPR__ - "apiUsage" : { - "name" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" }, - "extension": { "classification": "SystemMetaData", "purpose": "FeatureInsight" }, - "${include}": [ - "${MainThreadData}" - ] - } - */ - return mainThreadTelemetry.$publicLog('apiUsage', { - name: apiName, - extension: extension.id - }); - } - }; - // namespace: commands const commands: typeof vscode.commands = { registerCommand(id: string, command: (...args: any[]) => T | Thenable, thisArgs?: any): vscode.Disposable { @@ -407,22 +382,18 @@ export function createApiFactory( // namespace: workspace const workspace: typeof vscode.workspace = { get rootPath() { - apiUsage.publicLog('workspace#rootPath'); return extHostWorkspace.getPath(); }, set rootPath(value) { throw errors.readonly(); }, getWorkspaceFolder(resource) { - apiUsage.publicLog('workspace#getWorkspaceFolder'); return extHostWorkspace.getWorkspaceFolder(resource); }, get workspaceFolders() { - apiUsage.publicLog('workspace#workspaceFolders'); return extHostWorkspace.getWorkspaceFolders(); }, onDidChangeWorkspaceFolders: function (listener, thisArgs?, disposables?) { - apiUsage.publicLog('workspace#onDidChangeWorkspaceFolders'); return extHostWorkspace.onDidChangeWorkspace(listener, thisArgs, disposables); }, asRelativePath: (pathOrUri, includeWorkspace) => { @@ -505,22 +476,6 @@ export function createApiFactory( return extHostSCM.getLastInputBox(extension); }, createSourceControl(id: string, label: string, rootUri?: vscode.Uri) { - /* __GDPR__ - "registerSCMProvider" : { - "extensionId" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" }, - "providerId": { "classification": "PublicNonPersonalData", "purpose": "FeatureInsight" }, - "providerLabel": { "classification": "PublicPersonalData", "purpose": "FeatureInsight" }, - "${include}": [ - "${MainThreadData}" - ] - } - */ - mainThreadTelemetry.$publicLog('registerSCMProvider', { - extensionId: extension.id, - providerId: id, - providerLabel: label - }); - return extHostSCM.createSourceControl(extension, id, label, rootUri); } }; diff --git a/src/vs/workbench/api/node/extHostLanguageFeatures.ts b/src/vs/workbench/api/node/extHostLanguageFeatures.ts index c3764b060d5..4a6a22e86f0 100644 --- a/src/vs/workbench/api/node/extHostLanguageFeatures.ts +++ b/src/vs/workbench/api/node/extHostLanguageFeatures.ts @@ -18,7 +18,7 @@ import { ExtHostCommands, CommandsConverter } from 'vs/workbench/api/node/extHos import { ExtHostDiagnostics } from 'vs/workbench/api/node/extHostDiagnostics'; import { IWorkspaceSymbolProvider } from 'vs/workbench/parts/search/common/search'; import { asWinJsPromise } from 'vs/base/common/async'; -import { MainContext, MainThreadTelemetryShape, MainThreadLanguageFeaturesShape, ExtHostLanguageFeaturesShape, ObjectIdentifier, IRawColorInfo, IMainContext, IExtHostSuggestResult, IExtHostSuggestion } from './extHost.protocol'; +import { MainContext, MainThreadLanguageFeaturesShape, ExtHostLanguageFeaturesShape, ObjectIdentifier, IRawColorInfo, IMainContext, IExtHostSuggestResult, IExtHostSuggestion } from './extHost.protocol'; import { regExpLeadsToEndlessLoop } from 'vs/base/common/strings'; import { IPosition } from 'vs/editor/common/core/position'; import { IRange } from 'vs/editor/common/core/range'; @@ -748,7 +748,6 @@ export class ExtHostLanguageFeatures implements ExtHostLanguageFeaturesShape { private static _handlePool: number = 0; private _proxy: MainThreadLanguageFeaturesShape; - private _telemetry: MainThreadTelemetryShape; private _documents: ExtHostDocuments; private _commands: ExtHostCommands; private _heapService: ExtHostHeapService; @@ -764,7 +763,6 @@ export class ExtHostLanguageFeatures implements ExtHostLanguageFeaturesShape { diagnostics: ExtHostDiagnostics ) { this._proxy = mainContext.get(MainContext.MainThreadLanguageFeatures); - this._telemetry = mainContext.get(MainContext.MainThreadTelemetry); this._documents = documents; this._commands = commands; this._heapService = heapMonitor; -- GitLab