src/telemetry.ts: remove telemetry

The existing telemetry code is no longer used.
Remove the dependency on the telemetry module
that was a blocker of extension bundling.

Updates golang/vscode-go#53

Change-Id: I659166d121da05766cd5fd7ed16bbaf36e05c74b

Change-Id: I659166d121da05766cd5fd7ed16bbaf36e05c74b
GitHub-Last-Rev: f0db5abb161f298898b1e95955d77eb19c0f3d92
GitHub-Pull-Request: golang/vscode-go#74
Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/234530
Reviewed-by: Rebecca Stambler <rstambler@golang.org>
diff --git a/package-lock.json b/package-lock.json
index 7640a7b..ea435d4 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -221,17 +221,6 @@
         "picomatch": "^2.0.4"
       }
     },
-    "applicationinsights": {
-      "version": "1.4.0",
-      "resolved": "https://registry.npmjs.org/applicationinsights/-/applicationinsights-1.4.0.tgz",
-      "integrity": "sha512-TV8MYb0Kw9uE2cdu4V/UvTKdOABkX2+Fga9iDz0zqV7FLrNXfmAugWZmmdTx4JoynYkln3d5CUHY3oVSUEbfFw==",
-      "requires": {
-        "cls-hooked": "^4.2.2",
-        "continuation-local-storage": "^3.2.1",
-        "diagnostic-channel": "0.2.0",
-        "diagnostic-channel-publishers": "^0.3.2"
-      }
-    },
     "argparse": {
       "version": "1.0.10",
       "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz",
@@ -259,30 +248,6 @@
       "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz",
       "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU="
     },
-    "async-hook-jl": {
-      "version": "1.7.6",
-      "resolved": "https://registry.npmjs.org/async-hook-jl/-/async-hook-jl-1.7.6.tgz",
-      "integrity": "sha512-gFaHkFfSxTjvoxDMYqDuGHlcRyUuamF8s+ZTtJdDzqjws4mCt7v0vuV79/E2Wr2/riMQgtG4/yUtXWs1gZ7JMg==",
-      "requires": {
-        "stack-chain": "^1.3.7"
-      }
-    },
-    "async-listener": {
-      "version": "0.6.10",
-      "resolved": "https://registry.npmjs.org/async-listener/-/async-listener-0.6.10.tgz",
-      "integrity": "sha512-gpuo6xOyF4D5DE5WvyqZdPA3NGhiT6Qf07l7DCB0wwDEsLvDIbCr6j9S5aj5Ch96dLace5tXVzWBZkxU/c5ohw==",
-      "requires": {
-        "semver": "^5.3.0",
-        "shimmer": "^1.1.0"
-      },
-      "dependencies": {
-        "semver": {
-          "version": "5.7.1",
-          "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz",
-          "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ=="
-        }
-      }
-    },
     "asynckit": {
       "version": "0.4.0",
       "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz",
@@ -456,23 +421,6 @@
         }
       }
     },
-    "cls-hooked": {
-      "version": "4.2.2",
-      "resolved": "https://registry.npmjs.org/cls-hooked/-/cls-hooked-4.2.2.tgz",
-      "integrity": "sha512-J4Xj5f5wq/4jAvcdgoGsL3G103BtWpZrMo8NEinRltN+xpTZdI+M38pyQqhuFU/P792xkMFvnKSf+Lm81U1bxw==",
-      "requires": {
-        "async-hook-jl": "^1.7.6",
-        "emitter-listener": "^1.0.1",
-        "semver": "^5.4.1"
-      },
-      "dependencies": {
-        "semver": {
-          "version": "5.7.1",
-          "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz",
-          "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ=="
-        }
-      }
-    },
     "color-convert": {
       "version": "1.9.3",
       "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz",
@@ -508,15 +456,6 @@
       "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=",
       "dev": true
     },
-    "continuation-local-storage": {
-      "version": "3.2.1",
-      "resolved": "https://registry.npmjs.org/continuation-local-storage/-/continuation-local-storage-3.2.1.tgz",
-      "integrity": "sha512-jx44cconVqkCEEyLSKWwkvUXwO561jXMa3LPjTPsm5QR22PA0/mhe33FT4Xb5y74JDvt/Cq+5lm8S8rskLv9ZA==",
-      "requires": {
-        "async-listener": "^0.6.0",
-        "emitter-listener": "^1.1.1"
-      }
-    },
     "core-util-is": {
       "version": "1.0.2",
       "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz",
@@ -584,26 +523,6 @@
       "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz",
       "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk="
     },
-    "diagnostic-channel": {
-      "version": "0.2.0",
-      "resolved": "https://registry.npmjs.org/diagnostic-channel/-/diagnostic-channel-0.2.0.tgz",
-      "integrity": "sha1-zJmvlhLCP7H/8TYSxy8sv6qNWhc=",
-      "requires": {
-        "semver": "^5.3.0"
-      },
-      "dependencies": {
-        "semver": {
-          "version": "5.7.1",
-          "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz",
-          "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ=="
-        }
-      }
-    },
-    "diagnostic-channel-publishers": {
-      "version": "0.3.3",
-      "resolved": "https://registry.npmjs.org/diagnostic-channel-publishers/-/diagnostic-channel-publishers-0.3.3.tgz",
-      "integrity": "sha512-qIocRYU5TrGUkBlDDxaziAK1+squ8Yf2Ls4HldL3xxb/jzmWO2Enux7CvevNKYmF2kDXZ9HiRqwjPsjk8L+i2Q=="
-    },
     "diff": {
       "version": "4.0.2",
       "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz",
@@ -618,14 +537,6 @@
         "safer-buffer": "^2.1.0"
       }
     },
-    "emitter-listener": {
-      "version": "1.1.2",
-      "resolved": "https://registry.npmjs.org/emitter-listener/-/emitter-listener-1.1.2.tgz",
-      "integrity": "sha512-Bt1sBAGFHY9DKY+4/2cV6izcKJUf5T7/gkdmkxzX/qv9CcGH8xSwVRW5mtX03SWJtRTWSOpzCuWN9rBFYZepZQ==",
-      "requires": {
-        "shimmer": "^1.2.0"
-      }
-    },
     "emoji-regex": {
       "version": "7.0.3",
       "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz",
@@ -1657,11 +1568,6 @@
       "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=",
       "dev": true
     },
-    "shimmer": {
-      "version": "1.2.1",
-      "resolved": "https://registry.npmjs.org/shimmer/-/shimmer-1.2.1.tgz",
-      "integrity": "sha512-sQTKC1Re/rM6XyFM6fIAGHRPVGvyXfgzIDvzoq608vM+jeyVD0Tu1E6Np0Kc2zAIFWIj963V2800iF/9LPieQw=="
-    },
     "side-channel": {
       "version": "1.0.2",
       "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.2.tgz",
@@ -1725,11 +1631,6 @@
         "tweetnacl": "~0.14.0"
       }
     },
-    "stack-chain": {
-      "version": "1.3.7",
-      "resolved": "https://registry.npmjs.org/stack-chain/-/stack-chain-1.3.7.tgz",
-      "integrity": "sha1-0ZLJ/06moiyUxN1FkXHj8AzqEoU="
-    },
     "string-width": {
       "version": "2.1.1",
       "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz",
@@ -1937,14 +1838,6 @@
       "resolved": "https://registry.npmjs.org/vscode-debugprotocol/-/vscode-debugprotocol-1.40.0.tgz",
       "integrity": "sha512-Fwze+9qbLDPuQUhtITJSu/Vk6zIuakNM1iR2ZiZRgRaMEgBpMs2JSKaT0chrhJHCOy6/UbpsUbUBIseF6msV+g=="
     },
-    "vscode-extension-telemetry": {
-      "version": "0.1.2",
-      "resolved": "https://registry.npmjs.org/vscode-extension-telemetry/-/vscode-extension-telemetry-0.1.2.tgz",
-      "integrity": "sha512-FSbaZKlIH3VKvBJsKw7v5bESWHXzltji2rtjaJeJglpQH4tfClzwHMzlMXUZGiblV++djEzb1gW8mb5E+wxFsg==",
-      "requires": {
-        "applicationinsights": "1.4.0"
-      }
-    },
     "vscode-jsonrpc": {
       "version": "5.0.1",
       "resolved": "https://registry.npmjs.org/vscode-jsonrpc/-/vscode-jsonrpc-5.0.1.tgz",
diff --git a/package.json b/package.json
index dec77ba..18413d0 100644
--- a/package.json
+++ b/package.json
@@ -53,7 +53,6 @@
     "tree-kill": "^1.2.2",
     "vscode-debugadapter": "^1.40.0",
     "vscode-debugprotocol": "^1.40.0",
-    "vscode-extension-telemetry": "^0.1.2",
     "vscode-languageclient": "6.1.0",
     "web-request": "^1.0.7"
   },
diff --git a/src/goDebugConfiguration.ts b/src/goDebugConfiguration.ts
index f087e33..d09f2b1 100644
--- a/src/goDebugConfiguration.ts
+++ b/src/goDebugConfiguration.ts
@@ -10,7 +10,6 @@
 import { promptForMissingTool } from './goInstallTools';
 import { packagePathToGoModPathMap } from './goModules';
 import { getFromGlobalState, updateGlobalState } from './stateUtils';
-import { sendTelemetryEventForDebugConfiguration } from './telemetry';
 import { getBinPath, getCurrentGoPath, getGoConfig, getToolsEnvVars } from './util';
 
 export class GoDebugConfigurationProvider implements vscode.DebugConfigurationProvider {
@@ -36,10 +35,6 @@
 		debugConfiguration: vscode.DebugConfiguration,
 		token?: vscode.CancellationToken
 	): vscode.DebugConfiguration {
-		if (debugConfiguration) {
-			sendTelemetryEventForDebugConfiguration(debugConfiguration);
-		}
-
 		const activeEditor = vscode.window.activeTextEditor;
 		if (!debugConfiguration || !debugConfiguration.request) {
 			// if 'request' is missing interpret this as a missing launch.json
diff --git a/src/goFormat.ts b/src/goFormat.ts
index ed8a965..78a52a3 100644
--- a/src/goFormat.ts
+++ b/src/goFormat.ts
@@ -9,7 +9,6 @@
 import path = require('path');
 import vscode = require('vscode');
 import { promptForMissingTool, promptForUpdatingTool } from './goInstallTools';
-import { sendTelemetryEventForFormatting } from './telemetry';
 import { getBinPath, getGoConfig, getToolsEnvVars, killTree } from './util';
 
 export class GoDocumentFormattingEditProvider implements vscode.DocumentFormattingEditProvider {
@@ -71,7 +70,6 @@
 				return reject();
 			}
 
-			const t0 = Date.now();
 			const env = getToolsEnvVars();
 			const cwd = path.dirname(document.fileName);
 			let stdout = '';
@@ -101,12 +99,6 @@
 				const textEdits: vscode.TextEdit[] = [
 					new vscode.TextEdit(new vscode.Range(fileStart, fileEnd), stdout)
 				];
-
-				const timeTaken = Date.now() - t0;
-				sendTelemetryEventForFormatting(formatTool, timeTaken);
-				if (timeTaken > 750) {
-					console.log(`Formatting took too long(${timeTaken}ms). Format On Save feature could be aborted.`);
-				}
 				return resolve(textEdits);
 			});
 			if (p.pid) {
diff --git a/src/goImport.ts b/src/goImport.ts
index dd9a6de..c8445c7 100644
--- a/src/goImport.ts
+++ b/src/goImport.ts
@@ -11,7 +11,6 @@
 import { documentSymbols, GoOutlineImportsOptions } from './goOutline';
 import { getImportablePackages } from './goPackages';
 import { envPath } from './goPath';
-import { sendTelemetryEventForAddImportCmd } from './telemetry';
 import { getBinPath, getImportPath, getToolsEnvVars, parseFilePrelude } from './util';
 
 const missingToolMsg = 'Missing tool: ';
@@ -132,7 +131,6 @@
 		if (!imp) {
 			return;
 		}
-		sendTelemetryEventForAddImportCmd(arg);
 		const edits = getTextEditForAddImport(imp);
 		if (edits && edits.length > 0) {
 			const edit = new vscode.WorkspaceEdit();
diff --git a/src/goMain.ts b/src/goMain.ts
index 5fae062..ee62766 100644
--- a/src/goMain.ts
+++ b/src/goMain.ts
@@ -44,7 +44,6 @@
 	getFromGlobalState, getFromWorkspaceState, setGlobalState, setWorkspaceState, updateGlobalState,
 	updateWorkspaceState
 } from './stateUtils';
-import { disposeTelemetryReporter, sendTelemetryEventForConfig } from './telemetry';
 import { cancelRunningTests, showTestOutput } from './testUtils';
 import {
 	cleanupTempDir, getBinPath, getCurrentGoPath, getExtensionCommands, getGoConfig,
@@ -385,7 +384,6 @@
 				return;
 			}
 			const updatedGoConfig = getGoConfig();
-			sendTelemetryEventForConfig(updatedGoConfig);
 			updateGoPathGoRootFromConfig();
 
 			// If there was a change in "toolsGopath" setting, then clear cache for go tools
@@ -543,12 +541,10 @@
 	vscode.languages.setLanguageConfiguration(GO_MODE.language, {
 		wordPattern: /(-?\d*\.\d\w*)|([^\`\~\!\@\#\%\^\&\*\(\)\-\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\?\s]+)/g
 	});
-
-	sendTelemetryEventForConfig(getGoConfig());
 }
 
 export function deactivate() {
-	return Promise.all([disposeTelemetryReporter(), cancelRunningTests(), Promise.resolve(cleanupTempDir())]);
+	return Promise.all([cancelRunningTests(), Promise.resolve(cleanupTempDir())]);
 }
 
 function runBuilds(document: vscode.TextDocument, goConfig: vscode.WorkspaceConfiguration) {
diff --git a/src/goModules.ts b/src/goModules.ts
index eb07317..65d8b78 100644
--- a/src/goModules.ts
+++ b/src/goModules.ts
@@ -11,7 +11,6 @@
 import { envPath, fixDriveCasingInWindows } from './goPath';
 import { getTool } from './goTools';
 import { getFromGlobalState, updateGlobalState } from './stateUtils';
-import { sendTelemetryEventForModulesUsage } from './telemetry';
 import { getBinPath, getGoConfig, getGoVersion, getModuleCache, getToolsEnvVars } from './util';
 
 export let GO111MODULE: string;
@@ -100,7 +99,6 @@
 		return;
 	}
 	moduleUsageLogged = true;
-	sendTelemetryEventForModulesUsage();
 }
 
 const promptedToolsForCurrentSession = new Set<string>();
diff --git a/src/goPackages.ts b/src/goPackages.ts
index 8af7878..208d2d2 100644
--- a/src/goPackages.ts
+++ b/src/goPackages.ts
@@ -8,7 +8,6 @@
 import vscode = require('vscode');
 import { promptForMissingTool, promptForUpdatingTool } from './goInstallTools';
 import { envPath, fixDriveCasingInWindows, getCurrentGoWorkspaceFromGOPATH } from './goPath';
-import { sendTelemetryEventForGopkgs } from './telemetry';
 import { getBinPath, getCurrentGoPath, getGoVersion, getToolsEnvVars, isVendorSupported } from './util';
 
 type GopkgsDone = (res: Map<string, PackageInfo>) => void;
@@ -101,7 +100,6 @@
 				});
 			});
 			const timeTaken = Date.now() - t0;
-			sendTelemetryEventForGopkgs(timeTaken);
 			cacheTimeout = timeTaken > 5000 ? timeTaken : 5000;
 			return resolve(pkgs);
 		});
diff --git a/src/telemetry.ts b/src/telemetry.ts
index d0e557e..7bf6d49 100644
--- a/src/telemetry.ts
+++ b/src/telemetry.ts
@@ -3,191 +3,6 @@
  * Licensed under the MIT License. See LICENSE in the project root for license information.
  *--------------------------------------------------------*/
 
-import vscode = require('vscode');
-import TelemetryReporter from 'vscode-extension-telemetry';
+// TODO(hyangah): move this somewhere else (where easily modifiable during release process)
 
 export const extensionId: string = 'golang.go-nightly';
-const extension = vscode.extensions.getExtension(extensionId);
-const extensionVersion: string = extension ? extension.packageJSON.version : '';
-const aiKey: string = '';  // Empty aiKey disables telemetry.
-
-export function sendTelemetryEventForModulesUsage() {
-	/* __GDPR__
-		"modules" : {}
-	*/
-	sendTelemetryEvent('modules');
-}
-
-export function sendTelemetryEventForAddImportCmd(arg: { importPath: string; from: string }) {
-	/* __GDPR__
-		"addImportCmd" : {
-			"from" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" }
-		}
-	*/
-	sendTelemetryEvent('addImportCmd', { from: (arg && arg.from) || 'cmd' });
-}
-
-export function sendTelemetryEventForGopkgs(timeTaken: number) {
-	/* __GDPR__
-		"gopkgs" : {
-			"tool" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" },
-			"timeTaken": { "classification": "SystemMetaData", "purpose": "PerformanceAndHealth", "isMeasurement": true }
-		}
-	*/
-	sendTelemetryEvent('gopkgs', {}, { timeTaken });
-}
-
-export function sendTelemetryEventForFormatting(formatTool: string, timeTaken: number) {
-	/* __GDPR__
-		"format" : {
-			"tool" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" },
-			"timeTaken": { "classification": "SystemMetaData", "purpose": "PerformanceAndHealth", "isMeasurement": true }
-		}
-	*/
-	sendTelemetryEvent('format', { tool: formatTool }, { timeTaken });
-}
-
-export function sendTelemetryEventForDebugConfiguration(debugConfiguration: vscode.DebugConfiguration) {
-	/* __GDPR__
-		"debugConfiguration" : {
-			"request" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" },
-			"mode" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" },
-			"useApiV<NUMBER>": { "classification": "SystemMetaData", "purpose": "FeatureInsight" },
-			"apiVersion": { "classification": "SystemMetaData", "purpose": "FeatureInsight" },
-			"stopOnEntry": { "classification": "SystemMetaData", "purpose": "FeatureInsight" }
-		}
-	*/
-	sendTelemetryEvent('debugConfiguration', {
-		request: debugConfiguration.request,
-		mode: debugConfiguration.mode,
-		useApiV1: debugConfiguration.useApiV1,
-		apiVersion: debugConfiguration.apiVersion,
-		stopOnEntry: debugConfiguration.stopOnEntry
-	});
-}
-
-export function sendTelemetryEventForConfig(goConfig: vscode.WorkspaceConfiguration) {
-	/* __GDPR__
-		"goConfig" : {
-			"buildOnSave" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" },
-			"buildFlags": { "classification": "CustomerContent", "purpose": "FeatureInsight" },
-			"buildTags": { "classification": "CustomerContent", "purpose": "FeatureInsight" },
-			"formatTool": { "classification": "SystemMetaData", "purpose": "FeatureInsight" },
-			"formatFlags": { "classification": "CustomerContent", "purpose": "FeatureInsight" },
-			"generateTestsFlags": { "classification": "CustomerContent", "purpose": "FeatureInsight" },
-			"lintOnSave": { "classification": "SystemMetaData", "purpose": "FeatureInsight" },
-			"lintFlags": { "classification": "CustomerContent", "purpose": "FeatureInsight" },
-			"lintTool": { "classification": "SystemMetaData", "purpose": "FeatureInsight" },
-			"vetOnSave": { "classification": "SystemMetaData", "purpose": "FeatureInsight" },
-			"vetFlags": { "classification": "CustomerContent", "purpose": "FeatureInsight" },
-			"testOnSave": { "classification": "SystemMetaData", "purpose": "FeatureInsight" },
-			"testFlags": { "classification": "CustomerContent", "purpose": "FeatureInsight" },
-			"coverOnSave": { "classification": "SystemMetaData", "purpose": "FeatureInsight" },
-			"coverOnTestPackage": { "classification": "SystemMetaData", "purpose": "FeatureInsight" },
-			"coverageDecorator": { "classification": "SystemMetaData", "purpose": "FeatureInsight" },
-			"coverageOptions": { "classification": "SystemMetaData", "purpose": "FeatureInsight" },
-			"gopath": { "classification": "CustomerContent", "purpose": "FeatureInsight" },
-			"goroot": { "classification": "CustomerContent", "purpose": "FeatureInsight" },
-			"inferGopath": { "classification": "SystemMetaData", "purpose": "FeatureInsight" },
-			"toolsGopath": { "classification": "CustomerContent", "purpose": "FeatureInsight" },
-			"gocodeAutoBuild": { "classification": "SystemMetaData", "purpose": "FeatureInsight" },
-			"gocodePackageLookupMode": { "classification": "SystemMetaData", "purpose": "FeatureInsight" },
-			"useCodeSnippetsOnFunctionSuggest": { "classification": "SystemMetaData", "purpose": "FeatureInsight" },
-			"useCodeSnippetsOnFunctionSuggestWithoutType": { "classification": "SystemMetaData", "purpose": "FeatureInsight" },
-			"autocompleteUnimportedPackages": { "classification": "SystemMetaData", "purpose": "FeatureInsight" },
-			"docsTool": { "classification": "SystemMetaData", "purpose": "FeatureInsight" },
-			"useLanguageServer": { "classification": "SystemMetaData", "purpose": "FeatureInsight" },
-			"languageServerExperimentalFeatures": { "classification": "SystemMetaData", "purpose": "FeatureInsight" },
-			"includeImports": { "classification": "SystemMetaData", "purpose": "FeatureInsight" },
-			"addTags": { "classification": "CustomerContent", "purpose": "FeatureInsight" },
-			"removeTags": { "classification": "CustomerContent", "purpose": "FeatureInsight" },
-			"editorContextMenuCommands": { "classification": "SystemMetaData", "purpose": "FeatureInsight" },
-			"liveErrors": { "classification": "SystemMetaData", "purpose": "FeatureInsight" },
-			"codeLens": { "classification": "SystemMetaData", "purpose": "FeatureInsight" },
-			"alternateTools": { "classification": "CustomerContent", "purpose": "FeatureInsight" },
-			"useGoProxyToCheckForToolUpdates": { "classification": "CustomerContent", "purpose": "FeatureInsight" }
-		}
-	*/
-	sendTelemetryEvent('goConfig', {
-		buildOnSave: goConfig['buildOnSave'] + '',
-		buildFlags: goConfig['buildFlags'],
-		buildTags: goConfig['buildTags'],
-		formatOnSave: goConfig['formatOnSave'] + '',
-		formatTool: goConfig['formatTool'],
-		formatFlags: goConfig['formatFlags'],
-		lintOnSave: goConfig['lintOnSave'] + '',
-		lintFlags: goConfig['lintFlags'],
-		lintTool: goConfig['lintTool'],
-		generateTestsFlags: goConfig['generateTestsFlags'],
-		vetOnSave: goConfig['vetOnSave'] + '',
-		vetFlags: goConfig['vetFlags'],
-		testOnSave: goConfig['testOnSave'] + '',
-		testFlags: goConfig['testFlags'],
-		coverOnSave: goConfig['coverOnSave'] + '',
-		coverOnTestPackage: goConfig['coverOnTestPackage'] + '',
-		coverageDecorator: goConfig['coverageDecorator'],
-		coverageOptions: goConfig['coverageOptions'],
-		gopath: goConfig['gopath'] ? 'set' : '',
-		goroot: goConfig['goroot'] ? 'set' : '',
-		inferGopath: goConfig['inferGopath'] + '',
-		toolsGopath: goConfig['toolsGopath'] ? 'set' : '',
-		gocodeAutoBuild: goConfig['gocodeAutoBuild'] + '',
-		gocodePackageLookupMode: goConfig['gocodePackageLookupMode'] + '',
-		useCodeSnippetsOnFunctionSuggest: goConfig['useCodeSnippetsOnFunctionSuggest'] + '',
-		useCodeSnippetsOnFunctionSuggestWithoutType: goConfig['useCodeSnippetsOnFunctionSuggestWithoutType'] + '',
-		autocompleteUnimportedPackages: goConfig['autocompleteUnimportedPackages'] + '',
-		docsTool: goConfig['docsTool'],
-		useLanguageServer: goConfig['useLanguageServer'] + '',
-		languageServerExperimentalFeatures: JSON.stringify(goConfig['languageServerExperimentalFeatures']),
-		includeImports: goConfig['gotoSymbol'] && goConfig['gotoSymbol']['includeImports'] + '',
-		addTags: JSON.stringify(goConfig['addTags']),
-		removeTags: JSON.stringify(goConfig['removeTags']),
-		editorContextMenuCommands: JSON.stringify(goConfig['editorContextMenuCommands']),
-		liveErrors: JSON.stringify(goConfig['liveErrors']),
-		codeLens: JSON.stringify(goConfig['enableCodeLens']),
-		alternateTools: JSON.stringify(goConfig['alternateTools']),
-		useGoProxyToCheckForToolUpdates: goConfig['useGoProxyToCheckForToolUpdates'] + ''
-	});
-}
-
-export function sendTelemetryEventForKillingProcess(msg: any, matches: any) {
-	/* __GDPR__
-		"errorKillingProcess" : {
-			"message" : { "classification": "CallstackOrException", "purpose": "PerformanceAndHealth" },
-			"stack": { "classification": "CallstackOrException", "purpose": "PerformanceAndHealth" }
-		}
-	*/
-	sendTelemetryEvent('errorKillingProcess', { message: msg, stack: matches });
-}
-
-export function sendTelemetryEventForGoVersion(goVersion: string) {
-	/* __GDPR__
-		"getGoVersion" : {
-			"version" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" }
-		}
-	*/
-	sendTelemetryEvent('getGoVersion', { version: `${goVersion}` });
-}
-
-export function disposeTelemetryReporter(): Promise<any> {
-	if (telemtryReporter) {
-		return telemtryReporter.dispose();
-	}
-	return Promise.resolve(null);
-}
-
-let telemtryReporter: TelemetryReporter;
-
-function sendTelemetryEvent(
-	eventName: string,
-	properties?: { [key: string]: string },
-	measures?: { [key: string]: number }
-): void {
-	if (!aiKey) {
-		return; // cannot enable telemetry
-	}
-	telemtryReporter = telemtryReporter
-		? telemtryReporter
-		: new TelemetryReporter(extensionId, extensionVersion, aiKey);
-	telemtryReporter.sendTelemetryEvent(eventName, properties, measures);
-}
diff --git a/src/util.ts b/src/util.ts
index 3e12248..19e87a0 100644
--- a/src/util.ts
+++ b/src/util.ts
@@ -21,7 +21,7 @@
 	resolveHomeDir
 } from './goPath';
 import { outputChannel } from './goStatus';
-import { extensionId, sendTelemetryEventForGoVersion, sendTelemetryEventForKillingProcess } from './telemetry';
+import { extensionId } from './telemetry';
 
 let userNameHash: number = 0;
 
@@ -90,7 +90,6 @@
 			this.isDevel = true;
 			this.commit = matchesDevel[0];
 		}
-		sendTelemetryEventForGoVersion(this.format());
 	}
 
 	public format(): string {
@@ -292,7 +291,6 @@
 		return Promise.resolve(null);
 	}
 	if (cachedGoVersion && (cachedGoVersion.sv || cachedGoVersion.isDevel)) {
-		sendTelemetryEventForGoVersion(cachedGoVersion.format());
 		return Promise.resolve(cachedGoVersion);
 	}
 	return new Promise<GoVersion>((resolve) => {
@@ -867,12 +865,6 @@
 			p.kill();
 		} catch (e) {
 			console.log('Error killing process: ' + e);
-			if (e && e.message && e.stack) {
-				const matches = e.stack.match(/(src.go[a-z,A-Z]+\.js)/g);
-				if (matches) {
-					sendTelemetryEventForKillingProcess(e.message, matches);
-				}
-			}
 		}
 	}
 }