From 71d6dab02ac6bf129e775afe6c5787a080f45e93 Mon Sep 17 00:00:00 2001 From: Luciana Abud <45497113+luabud@users.noreply.github.com> Date: Fri, 11 Aug 2023 11:46:42 -0700 Subject: [PATCH] Add one more property to load event (#21800) This PR adds app name to the editor_load telemetry event --- src/client/startupTelemetry.ts | 3 +++ src/client/telemetry/index.ts | 7 ++++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/src/client/startupTelemetry.ts b/src/client/startupTelemetry.ts index f4d3fc254b67..43cf09c23c37 100644 --- a/src/client/startupTelemetry.ts +++ b/src/client/startupTelemetry.ts @@ -1,6 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. +import * as vscode from 'vscode'; import { IWorkspaceService } from './common/application/types'; import { isTestExecution } from './common/constants'; import { ITerminalHelper } from './common/terminal/types'; @@ -81,6 +82,7 @@ async function getActivationTelemetryProps(serviceContainer: IServiceContainer): // TODO: If any one of these parts fails we send no info. We should // be able to partially populate as much as possible instead // (through granular try-catch statements). + const appName = vscode.env.appName; const workspaceService = serviceContainer.get(IWorkspaceService); const workspaceFolderCount = workspaceService.workspaceFolders?.length || 0; const terminalHelper = serviceContainer.get(ITerminalHelper); @@ -129,5 +131,6 @@ async function getActivationTelemetryProps(serviceContainer: IServiceContainer): hasPythonThree, usingUserDefinedInterpreter, usingGlobalInterpreter, + appName, }; } diff --git a/src/client/telemetry/index.ts b/src/client/telemetry/index.ts index f0b57a4043d9..3fcc177edea7 100644 --- a/src/client/telemetry/index.ts +++ b/src/client/telemetry/index.ts @@ -729,6 +729,7 @@ export interface IEventNamePropertyMapping { */ /* __GDPR__ "editor.load" : { + "appName" : {"classification": "SystemMetaData", "purpose": "FeatureInsight", "owner": "luabud"}, "codeloadingtime" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "owner": "luabud" }, "condaversion" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "owner": "luabud" }, "errorname" : { "classification": "CallstackOrException", "purpose": "PerformanceAndHealth", "owner": "luabud" }, @@ -747,6 +748,10 @@ export interface IEventNamePropertyMapping { } */ [EventName.EDITOR_LOAD]: { + /** + * The name of the application where the Python extension is running + */ + appName?: string | undefined; /** * The conda version if selected */ @@ -1549,7 +1554,7 @@ export interface IEventNamePropertyMapping { * This event also has a measure, "resultLength", which records the number of completions provided. */ /* __GDPR__ - "jedi_language_server.request" : { + "jedi_language_server.request" : { "method": {"classification": "SystemMetaData", "purpose": "FeatureInsight", "owner": "karthiknadig"} } */