Skip to content

Commit 71d6dab

Browse files
authored
Add one more property to load event (#21800)
This PR adds app name to the editor_load telemetry event
1 parent ab8d3b2 commit 71d6dab

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

src/client/startupTelemetry.ts

+3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
// Copyright (c) Microsoft Corporation. All rights reserved.
22
// Licensed under the MIT License.
33

4+
import * as vscode from 'vscode';
45
import { IWorkspaceService } from './common/application/types';
56
import { isTestExecution } from './common/constants';
67
import { ITerminalHelper } from './common/terminal/types';
@@ -81,6 +82,7 @@ async function getActivationTelemetryProps(serviceContainer: IServiceContainer):
8182
// TODO: If any one of these parts fails we send no info. We should
8283
// be able to partially populate as much as possible instead
8384
// (through granular try-catch statements).
85+
const appName = vscode.env.appName;
8486
const workspaceService = serviceContainer.get<IWorkspaceService>(IWorkspaceService);
8587
const workspaceFolderCount = workspaceService.workspaceFolders?.length || 0;
8688
const terminalHelper = serviceContainer.get<ITerminalHelper>(ITerminalHelper);
@@ -129,5 +131,6 @@ async function getActivationTelemetryProps(serviceContainer: IServiceContainer):
129131
hasPythonThree,
130132
usingUserDefinedInterpreter,
131133
usingGlobalInterpreter,
134+
appName,
132135
};
133136
}

src/client/telemetry/index.ts

+6-1
Original file line numberDiff line numberDiff line change
@@ -729,6 +729,7 @@ export interface IEventNamePropertyMapping {
729729
*/
730730
/* __GDPR__
731731
"editor.load" : {
732+
"appName" : {"classification": "SystemMetaData", "purpose": "FeatureInsight", "owner": "luabud"},
732733
"codeloadingtime" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "owner": "luabud" },
733734
"condaversion" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "owner": "luabud" },
734735
"errorname" : { "classification": "CallstackOrException", "purpose": "PerformanceAndHealth", "owner": "luabud" },
@@ -747,6 +748,10 @@ export interface IEventNamePropertyMapping {
747748
}
748749
*/
749750
[EventName.EDITOR_LOAD]: {
751+
/**
752+
* The name of the application where the Python extension is running
753+
*/
754+
appName?: string | undefined;
750755
/**
751756
* The conda version if selected
752757
*/
@@ -1549,7 +1554,7 @@ export interface IEventNamePropertyMapping {
15491554
* This event also has a measure, "resultLength", which records the number of completions provided.
15501555
*/
15511556
/* __GDPR__
1552-
"jedi_language_server.request" : {
1557+
"jedi_language_server.request" : {
15531558
"method": {"classification": "SystemMetaData", "purpose": "FeatureInsight", "owner": "karthiknadig"}
15541559
}
15551560
*/

0 commit comments

Comments
 (0)