From 69841c4e65d96d1c1edb74b5a32ced8ace382678 Mon Sep 17 00:00:00 2001 From: Brett Cannon Date: Mon, 8 Jul 2019 15:42:28 -0700 Subject: [PATCH 1/5] Update package-lock.json --- package-lock.json | 100 +++++++++++++++++++++++++++++++--------------- 1 file changed, 68 insertions(+), 32 deletions(-) diff --git a/package-lock.json b/package-lock.json index 51c3a42a862d..884d9eff9179 100644 --- a/package-lock.json +++ b/package-lock.json @@ -4296,7 +4296,8 @@ "version": "2.1.1", "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", - "dev": true + "dev": true, + "optional": true }, "aproba": { "version": "1.2.0", @@ -4320,13 +4321,15 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=", - "dev": true + "dev": true, + "optional": true }, "brace-expansion": { "version": "1.1.11", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", "dev": true, + "optional": true, "requires": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" @@ -4343,19 +4346,22 @@ "version": "1.1.0", "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz", "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=", - "dev": true + "dev": true, + "optional": true }, "concat-map": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", - "dev": true + "dev": true, + "optional": true }, "console-control-strings": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/console-control-strings/-/console-control-strings-1.1.0.tgz", "integrity": "sha1-PXz0Rk22RG6mRL9LOVB/mFEAjo4=", - "dev": true + "dev": true, + "optional": true }, "core-util-is": { "version": "1.0.2", @@ -4486,7 +4492,8 @@ "version": "2.0.3", "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=", - "dev": true + "dev": true, + "optional": true }, "ini": { "version": "1.3.5", @@ -4500,6 +4507,7 @@ "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", "dev": true, + "optional": true, "requires": { "number-is-nan": "^1.0.0" } @@ -4516,6 +4524,7 @@ "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", "dev": true, + "optional": true, "requires": { "brace-expansion": "^1.1.7" } @@ -4524,13 +4533,15 @@ "version": "0.0.8", "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=", - "dev": true + "dev": true, + "optional": true }, "minipass": { "version": "2.3.5", "resolved": "https://registry.npmjs.org/minipass/-/minipass-2.3.5.tgz", "integrity": "sha512-Gi1W4k059gyRbyVUZQ4mEqLm0YIUiGYfvxhF6SIlk3ui1WVxMTGfGdQ2SInh3PDrRTVvPKgULkpJtT4RH10+VA==", "dev": true, + "optional": true, "requires": { "safe-buffer": "^5.1.2", "yallist": "^3.0.0" @@ -4551,6 +4562,7 @@ "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", "dev": true, + "optional": true, "requires": { "minimist": "0.0.8" } @@ -4639,7 +4651,8 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz", "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=", - "dev": true + "dev": true, + "optional": true }, "object-assign": { "version": "4.1.1", @@ -4653,6 +4666,7 @@ "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", "dev": true, + "optional": true, "requires": { "wrappy": "1" } @@ -4748,7 +4762,8 @@ "version": "5.1.2", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", - "dev": true + "dev": true, + "optional": true }, "safer-buffer": { "version": "2.1.2", @@ -4790,6 +4805,7 @@ "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", "dev": true, + "optional": true, "requires": { "code-point-at": "^1.0.0", "is-fullwidth-code-point": "^1.0.0", @@ -4811,6 +4827,7 @@ "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", "dev": true, + "optional": true, "requires": { "ansi-regex": "^2.0.0" } @@ -4859,13 +4876,15 @@ "version": "1.0.2", "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", - "dev": true + "dev": true, + "optional": true }, "yallist": { "version": "3.0.3", "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.0.3.tgz", "integrity": "sha512-S+Zk8DEWE6oKpV+vI3qWkaK+jSbIK86pCwe2IF/xwIpQ8jEuxpw9NyaGjmp9+BoJv5FV2piqCDcoCtStppiq2A==", - "dev": true + "dev": true, + "optional": true } } }, @@ -8455,7 +8474,8 @@ "version": "2.1.1", "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", - "dev": true + "dev": true, + "optional": true }, "aproba": { "version": "1.2.0", @@ -8479,13 +8499,15 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=", - "dev": true + "dev": true, + "optional": true }, "brace-expansion": { "version": "1.1.11", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", "dev": true, + "optional": true, "requires": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" @@ -8495,19 +8517,22 @@ "version": "1.1.0", "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz", "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=", - "dev": true + "dev": true, + "optional": true }, "concat-map": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", - "dev": true + "dev": true, + "optional": true }, "console-control-strings": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/console-control-strings/-/console-control-strings-1.1.0.tgz", "integrity": "sha1-PXz0Rk22RG6mRL9LOVB/mFEAjo4=", - "dev": true + "dev": true, + "optional": true }, "core-util-is": { "version": "1.0.2", @@ -8628,7 +8653,8 @@ "version": "2.0.3", "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=", - "dev": true + "dev": true, + "optional": true }, "ini": { "version": "1.3.5", @@ -8642,6 +8668,7 @@ "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", "dev": true, + "optional": true, "requires": { "number-is-nan": "^1.0.0" } @@ -8658,6 +8685,7 @@ "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", "dev": true, + "optional": true, "requires": { "brace-expansion": "^1.1.7" } @@ -8666,13 +8694,15 @@ "version": "0.0.8", "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=", - "dev": true + "dev": true, + "optional": true }, "mkdirp": { "version": "0.5.1", "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", "dev": true, + "optional": true, "requires": { "minimist": "0.0.8" } @@ -8761,7 +8791,8 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz", "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=", - "dev": true + "dev": true, + "optional": true }, "object-assign": { "version": "4.1.1", @@ -8775,6 +8806,7 @@ "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", "dev": true, + "optional": true, "requires": { "wrappy": "1" } @@ -8870,7 +8902,8 @@ "version": "5.1.1", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.1.tgz", "integrity": "sha512-kKvNJn6Mm93gAczWVJg7wH+wGYWNrDHdWvpUmHyEsgCtIwwo3bqPtV4tR5tuPaUhTOo/kvhVwd8XwwOllGYkbg==", - "dev": true + "dev": true, + "optional": true }, "safer-buffer": { "version": "2.1.2", @@ -8912,6 +8945,7 @@ "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", "dev": true, + "optional": true, "requires": { "code-point-at": "^1.0.0", "is-fullwidth-code-point": "^1.0.0", @@ -8933,6 +8967,7 @@ "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", "dev": true, + "optional": true, "requires": { "ansi-regex": "^2.0.0" } @@ -8990,7 +9025,8 @@ "version": "1.0.2", "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", - "dev": true + "dev": true, + "optional": true }, "yallist": { "version": "3.0.3", @@ -13970,7 +14006,7 @@ }, "convert-source-map": { "version": "1.6.0", - "resolved": "", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.6.0.tgz", "integrity": "sha512-eFu7XigvxdZ1ETfbgPBohgyQ/Z++C0eEhTor0qRwBw9unw+L0/6V8wkSuGgzdThkiS5lSpdptOQPD8Ak40a+7A==", "dev": true, "requires": { @@ -13979,7 +14015,7 @@ }, "execa": { "version": "1.0.0", - "resolved": "", + "resolved": "https://registry.npmjs.org/execa/-/execa-1.0.0.tgz", "integrity": "sha512-adbxcyWV46qiHyvSp50TKt05tB4tK3HcmF7/nxfAdhnox83seTDbwnaqKO4sXRy7roHAIFqJP/Rw/AuEbX61LA==", "dev": true, "requires": { @@ -14005,7 +14041,7 @@ }, "find-up": { "version": "3.0.0", - "resolved": "", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", "dev": true, "requires": { @@ -14020,7 +14056,7 @@ }, "get-stream": { "version": "4.1.0", - "resolved": "", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-4.1.0.tgz", "integrity": "sha512-GMat4EJ5161kIy2HevLlr4luNjBgvmj413KaQA7jt4V8B4RDsfpHk7WQ9GVqfYyyx8OS/L66Kox+rJRNklLK7w==", "dev": true, "requires": { @@ -14043,7 +14079,7 @@ }, "locate-path": { "version": "3.0.0", - "resolved": "", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", "dev": true, "requires": { @@ -14063,7 +14099,7 @@ }, "os-locale": { "version": "3.1.0", - "resolved": "", + "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-3.1.0.tgz", "integrity": "sha512-Z8l3R4wYWM40/52Z+S265okfFj8Kt2cC2MKY+xNi3kFs+XGI7WXu/I309QQQYbRW4ijiZ+yxs9pqEhJh0DqW3Q==", "dev": true, "requires": { @@ -14074,7 +14110,7 @@ }, "path-exists": { "version": "3.0.0", - "resolved": "", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=", "dev": true }, @@ -14086,7 +14122,7 @@ }, "pkg-dir": { "version": "3.0.0", - "resolved": "", + "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-3.0.0.tgz", "integrity": "sha512-/E57AYkoeQ25qkxMj5PBOVgF8Kiu/h7cYS30Z5+R7WaiCCBfLq58ZI/dSeaEKb9WVJV5n/03QwrN3IeWIFllvw==", "dev": true, "requires": { @@ -14095,7 +14131,7 @@ }, "pump": { "version": "3.0.0", - "resolved": "", + "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", "integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==", "dev": true, "requires": { @@ -14111,13 +14147,13 @@ }, "resolve-from": { "version": "4.0.0", - "resolved": "", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", "dev": true }, "rimraf": { "version": "2.6.3", - "resolved": "", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.3.tgz", "integrity": "sha512-mwqeW5XsA2qAejG46gYdENaxXjx9onRNCfn7L0duuP4hCuTIi/QO7PDK07KJfp1d+izWPrzEJDcSqBa0OZQriA==", "dev": true, "requires": { From 7c248da1b40d24ac68ebdaca1d38bd06a87cab13 Mon Sep 17 00:00:00 2001 From: Brett Cannon Date: Mon, 8 Jul 2019 15:42:48 -0700 Subject: [PATCH 2/5] Remove PYTHON_LANGUAGE_SERVER.ANALYSIS_TIME telemetry --- src/client/telemetry/constants.ts | 1 - src/client/telemetry/index.ts | 1 - 2 files changed, 2 deletions(-) diff --git a/src/client/telemetry/constants.ts b/src/client/telemetry/constants.ts index f33536ced805..064d45b7eef9 100644 --- a/src/client/telemetry/constants.ts +++ b/src/client/telemetry/constants.ts @@ -53,7 +53,6 @@ export enum EventName { UNITTEST_NAVIGATE_TEST_SUITE = 'UNITTEST.NAVIGATE.TEST_SUITE', UNITTEST_EXPLORER_WORK_SPACE_COUNT = 'UNITTEST.TEST_EXPLORER.WORK_SPACE_COUNT', PYTHON_LANGUAGE_SERVER_SWITCHED = 'PYTHON_LANGUAGE_SERVER.SWITCHED', - PYTHON_LANGUAGE_SERVER_ANALYSISTIME = 'PYTHON_LANGUAGE_SERVER.ANALYSIS_TIME', PYTHON_LANGUAGE_SERVER_ENABLED = 'PYTHON_LANGUAGE_SERVER.ENABLED', PYTHON_LANGUAGE_SERVER_EXTRACTED = 'PYTHON_LANGUAGE_SERVER.EXTRACTED', PYTHON_LANGUAGE_SERVER_DOWNLOADED = 'PYTHON_LANGUAGE_SERVER.DOWNLOADED', diff --git a/src/client/telemetry/index.ts b/src/client/telemetry/index.ts index dbe6be6a46a9..e221996fbed3 100644 --- a/src/client/telemetry/index.ts +++ b/src/client/telemetry/index.ts @@ -299,7 +299,6 @@ export interface IEventNamePropertyMapping { [EventName.PYTHON_INTERPRETER_DISCOVERY]: InterpreterDiscovery; [EventName.PYTHON_INTERPRETER_ACTIVATE_ENVIRONMENT_PROMPT]: { selection: 'Yes' | 'No' | 'Ignore' | undefined }; [EventName.PYTHON_LANGUAGE_SERVER_SWITCHED]: { change: 'Switch to Jedi from LS' | 'Switch to LS from Jedi' }; - [EventName.PYTHON_LANGUAGE_SERVER_ANALYSISTIME]: { success: boolean }; [EventName.PYTHON_LANGUAGE_SERVER_DOWNLOADED]: LanguageServerVersionTelemetry; [EventName.PYTHON_LANGUAGE_SERVER_ENABLED]: never | undefined; [EventName.PYTHON_LANGUAGE_SERVER_ERROR]: LanguageServerErrorTelemetry; From 85101849b460eef5c0aba96f3c69de6503d3d2d9 Mon Sep 17 00:00:00 2001 From: Brett Cannon Date: Mon, 8 Jul 2019 15:48:14 -0700 Subject: [PATCH 3/5] Drop python_language_server.platform_not_supported telemetry --- src/client/activation/activationService.ts | 2 +- .../languageServer/languageServerCompatibilityService.ts | 2 +- src/client/telemetry/constants.ts | 1 - src/client/telemetry/index.ts | 1 - 4 files changed, 2 insertions(+), 4 deletions(-) diff --git a/src/client/activation/activationService.ts b/src/client/activation/activationService.ts index b011700dc1cb..3232eb20d969 100644 --- a/src/client/activation/activationService.ts +++ b/src/client/activation/activationService.ts @@ -59,7 +59,7 @@ export class LanguageServerExtensionActivationService implements IExtensionActiv const diagnostic = await this.lsNotSupportedDiagnosticService.diagnose(undefined); this.lsNotSupportedDiagnosticService.handle(diagnostic).ignoreErrors(); if (diagnostic.length) { - sendTelemetryEvent(EventName.PYTHON_LANGUAGE_SERVER_PLATFORM_NOT_SUPPORTED); + sendTelemetryEvent(EventName.PYTHON_LANGUAGE_SERVER_PLATFORM_SUPPORTED, undefined, { supported: false }); jedi = true; } } else { diff --git a/src/client/activation/languageServer/languageServerCompatibilityService.ts b/src/client/activation/languageServer/languageServerCompatibilityService.ts index f5e81fca7e41..91875dc94aed 100644 --- a/src/client/activation/languageServer/languageServerCompatibilityService.ts +++ b/src/client/activation/languageServer/languageServerCompatibilityService.ts @@ -16,7 +16,7 @@ export class LanguageServerCompatibilityService implements ILanguageServerCompat public async isSupported(): Promise { try { const supported = await this.dotnetCompatibility.isSupported(); - sendTelemetryEvent(EventName.PYTHON_LANGUAGE_SERVER_PLATFORM_SUPPORTED, undefined, { supported }); + sendTelemetryEvent(EventName.PYTHON_LANGUAGE_SERVER_PLATFORM_SUPPORTED, undefined, { supported: supported }); return supported; } catch (ex) { traceError('Unable to determine whether LS is supported', ex); diff --git a/src/client/telemetry/constants.ts b/src/client/telemetry/constants.ts index 064d45b7eef9..771ef11de413 100644 --- a/src/client/telemetry/constants.ts +++ b/src/client/telemetry/constants.ts @@ -59,7 +59,6 @@ export enum EventName { PYTHON_LANGUAGE_SERVER_ERROR = 'PYTHON_LANGUAGE_SERVER.ERROR', PYTHON_LANGUAGE_SERVER_STARTUP = 'PYTHON_LANGUAGE_SERVER.STARTUP', PYTHON_LANGUAGE_SERVER_READY = 'PYTHON_LANGUAGE_SERVER.READY', - PYTHON_LANGUAGE_SERVER_PLATFORM_NOT_SUPPORTED = 'PYTHON_LANGUAGE_SERVER.PLATFORM_NOT_SUPPORTED', PYTHON_LANGUAGE_SERVER_PLATFORM_SUPPORTED = 'PYTHON_LANGUAGE_SERVER.PLATFORM_SUPPORTED', PYTHON_LANGUAGE_SERVER_TELEMETRY = 'PYTHON_LANGUAGE_SERVER.EVENT', PYTHON_EXPERIMENTS = 'PYTHON_EXPERIMENTS', diff --git a/src/client/telemetry/index.ts b/src/client/telemetry/index.ts index e221996fbed3..d215e51fe07e 100644 --- a/src/client/telemetry/index.ts +++ b/src/client/telemetry/index.ts @@ -304,7 +304,6 @@ export interface IEventNamePropertyMapping { [EventName.PYTHON_LANGUAGE_SERVER_ERROR]: LanguageServerErrorTelemetry; [EventName.PYTHON_LANGUAGE_SERVER_EXTRACTED]: LanguageServerVersionTelemetry; [EventName.PYTHON_LANGUAGE_SERVER_LIST_BLOB_STORE_PACKAGES]: never | undefined; - [EventName.PYTHON_LANGUAGE_SERVER_PLATFORM_NOT_SUPPORTED]: never | undefined; [EventName.PYTHON_LANGUAGE_SERVER_PLATFORM_SUPPORTED]: LanguageServePlatformSupported; [EventName.PYTHON_LANGUAGE_SERVER_READY]: never | undefined; [EventName.PYTHON_LANGUAGE_SERVER_STARTUP]: never | undefined; From 91c307170456e0c6f83a7af0acd39efe3ba5100d Mon Sep 17 00:00:00 2001 From: Brett Cannon Date: Mon, 8 Jul 2019 16:03:13 -0700 Subject: [PATCH 4/5] Consolidate unittest.navigate.* telemetry to unittest.navigate --- src/client/telemetry/constants.ts | 4 +--- src/client/telemetry/index.ts | 6 ++---- src/client/testing/navigation/fileNavigator.ts | 2 +- src/client/testing/navigation/functionNavigator.ts | 4 ++-- src/client/testing/navigation/suiteNavigator.ts | 4 ++-- 5 files changed, 8 insertions(+), 12 deletions(-) diff --git a/src/client/telemetry/constants.ts b/src/client/telemetry/constants.ts index 771ef11de413..e86486fd0f5f 100644 --- a/src/client/telemetry/constants.ts +++ b/src/client/telemetry/constants.ts @@ -48,9 +48,7 @@ export enum EventName { UNITTEST_CONFIGURE = 'UNITTEST.CONFIGURE', UNITTEST_CONFIGURING = 'UNITTEST.CONFIGURING', UNITTEST_VIEW_OUTPUT = 'UNITTEST.VIEW_OUTPUT', - UNITTEST_NAVIGATE_TEST_FILE = 'UNITTEST.NAVIGATE.TEST_FILE', - UNITTEST_NAVIGATE_TEST_FUNCTION = 'UNITTEST.NAVIGATE.TEST_FUNCTION', - UNITTEST_NAVIGATE_TEST_SUITE = 'UNITTEST.NAVIGATE.TEST_SUITE', + UNITTEST_NAVIGATE = 'UNITTEST.NAVIGATE', UNITTEST_EXPLORER_WORK_SPACE_COUNT = 'UNITTEST.TEST_EXPLORER.WORK_SPACE_COUNT', PYTHON_LANGUAGE_SERVER_SWITCHED = 'PYTHON_LANGUAGE_SERVER.SWITCHED', PYTHON_LANGUAGE_SERVER_ENABLED = 'PYTHON_LANGUAGE_SERVER.ENABLED', diff --git a/src/client/telemetry/index.ts b/src/client/telemetry/index.ts index d215e51fe07e..c449b851b9ba 100644 --- a/src/client/telemetry/index.ts +++ b/src/client/telemetry/index.ts @@ -323,6 +323,8 @@ export interface IEventNamePropertyMapping { [EventName.TERMINAL_CREATE]: TerminalTelemetry; [EventName.UNITTEST_DISCOVER]: TestDiscoverytTelemetry; [EventName.UNITTEST_DISCOVER_WITH_PYCODE]: never | undefined; + [EventName.UNITTEST_NAVIGATE]: { byFile?: boolean; byFunction?: boolean; bySuite?: boolean; focus_code?: boolean }; + [EventName.UNITTEST_EXPLORER_WORK_SPACE_COUNT]: { count: number }; [EventName.UNITTEST_RUN]: TestRunTelemetry; [EventName.UNITTEST_STOP]: never | undefined; [EventName.UNITTEST_DISABLE]: never | undefined; @@ -401,10 +403,6 @@ export interface IEventNamePropertyMapping { [Telemetry.WebviewMonacoStyleUpdate]: never | undefined; [Telemetry.WebviewStartup]: { type: string }; [Telemetry.WebviewStyleUpdate]: never | undefined; - [EventName.UNITTEST_NAVIGATE_TEST_FILE]: never | undefined; - [EventName.UNITTEST_NAVIGATE_TEST_FUNCTION]: { focus_code: boolean }; - [EventName.UNITTEST_NAVIGATE_TEST_SUITE]: { focus_code: boolean }; - [EventName.UNITTEST_EXPLORER_WORK_SPACE_COUNT]: { count: number }; /* Telemetry event sent with details of Jedi Memory usage. memory - Memory usage of Process in kb. diff --git a/src/client/testing/navigation/fileNavigator.ts b/src/client/testing/navigation/fileNavigator.ts index 186f1b1b98b0..c5032c236fca 100644 --- a/src/client/testing/navigation/fileNavigator.ts +++ b/src/client/testing/navigation/fileNavigator.ts @@ -15,7 +15,7 @@ import { ITestCodeNavigator, ITestNavigatorHelper } from './types'; export class TestFileCodeNavigator implements ITestCodeNavigator { constructor(@inject(ITestNavigatorHelper) private readonly helper: ITestNavigatorHelper) { } @swallowExceptions('Navigate to test file') - @captureTelemetry(EventName.UNITTEST_NAVIGATE_TEST_FILE, undefined, true) + @captureTelemetry(EventName.UNITTEST_NAVIGATE, { byFile: true }) public async navigateTo(_: Uri, item: TestFile, __: boolean): Promise { await this.helper.openFile(Uri.file(item.fullPath)); } diff --git a/src/client/testing/navigation/functionNavigator.ts b/src/client/testing/navigation/functionNavigator.ts index b7ee29cfe533..542a3964fcaa 100644 --- a/src/client/testing/navigation/functionNavigator.ts +++ b/src/client/testing/navigation/functionNavigator.ts @@ -22,9 +22,9 @@ export class TestFunctionCodeNavigator implements ITestCodeNavigator { @inject(ITestCollectionStorageService) private readonly storage: ITestCollectionStorageService ) { } @swallowExceptions('Navigate to test function') - @captureTelemetry(EventName.UNITTEST_NAVIGATE_TEST_FUNCTION, undefined, true) + @captureTelemetry(EventName.UNITTEST_NAVIGATE, { byFunction: true }, true) // To measure execution time. public async navigateTo(resource: Uri, fn: TestFunction, focus: boolean = true): Promise { - sendTelemetryEvent(EventName.UNITTEST_NAVIGATE_TEST_FUNCTION, undefined, { focus_code: focus }); + sendTelemetryEvent(EventName.UNITTEST_NAVIGATE, undefined, { focus_code: focus, byFunction: true }); if (this.cancellationToken) { this.cancellationToken.cancel(); } diff --git a/src/client/testing/navigation/suiteNavigator.ts b/src/client/testing/navigation/suiteNavigator.ts index 5a92ac096e74..660783d0f30f 100644 --- a/src/client/testing/navigation/suiteNavigator.ts +++ b/src/client/testing/navigation/suiteNavigator.ts @@ -22,9 +22,9 @@ export class TestSuiteCodeNavigator implements ITestCodeNavigator { @inject(ITestCollectionStorageService) private readonly storage: ITestCollectionStorageService ) { } @swallowExceptions('Navigate to test suite') - @captureTelemetry(EventName.UNITTEST_NAVIGATE_TEST_SUITE, undefined, true) + @captureTelemetry(EventName.UNITTEST_NAVIGATE, { bySuite: true }, true) // For measuring execution time. public async navigateTo(resource: Uri, suite: TestSuite, focus: boolean = true): Promise { - sendTelemetryEvent(EventName.UNITTEST_NAVIGATE_TEST_SUITE, undefined, { focus_code: focus }); + sendTelemetryEvent(EventName.UNITTEST_NAVIGATE, undefined, { focus_code: focus, bySuite: true }); if (this.cancellationToken) { this.cancellationToken.cancel(); } From 191fb8b81c467e3f7d2baed42bf9cd1010adbd0b Mon Sep 17 00:00:00 2001 From: Brett Cannon Date: Mon, 8 Jul 2019 16:16:26 -0700 Subject: [PATCH 5/5] Add news entry --- news/3 Code Health/6451.md | 1 + 1 file changed, 1 insertion(+) create mode 100644 news/3 Code Health/6451.md diff --git a/news/3 Code Health/6451.md b/news/3 Code Health/6451.md new file mode 100644 index 000000000000..d6940de559fa --- /dev/null +++ b/news/3 Code Health/6451.md @@ -0,0 +1 @@ +Consolidate telemetry.