Skip to content

Add one more property to load event #21800

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 11, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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