Skip to content

Commit

Permalink
Add one more property to load event (#21800)
Browse files Browse the repository at this point in the history
This PR adds app name to the editor_load telemetry event
  • Loading branch information
luabud committed Aug 11, 2023
1 parent ab8d3b2 commit 71d6dab
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
3 changes: 3 additions & 0 deletions src/client/startupTelemetry.ts
Original file line number Diff line number Diff line change
@@ -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';
Expand Down Expand Up @@ -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>(IWorkspaceService);
const workspaceFolderCount = workspaceService.workspaceFolders?.length || 0;
const terminalHelper = serviceContainer.get<ITerminalHelper>(ITerminalHelper);
Expand Down Expand Up @@ -129,5 +131,6 @@ async function getActivationTelemetryProps(serviceContainer: IServiceContainer):
hasPythonThree,
usingUserDefinedInterpreter,
usingGlobalInterpreter,
appName,
};
}
7 changes: 6 additions & 1 deletion src/client/telemetry/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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" },
Expand All @@ -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
*/
Expand Down Expand Up @@ -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"}
}
*/
Expand Down

0 comments on commit 71d6dab

Please sign in to comment.