Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Telemetry
  • Loading branch information
DonJayamanne committed Apr 2, 2019
commit dc5030927cb73a31c6db362e8ebe9b4ae131d88c
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,12 @@
* Fix issue with expanding variables in watch window and hover.
* Fix issue with launching a sub-module.

### Code Health

1. Capture telemetry to track installer used when installing packages.
Comment thread
DonJayamanne marked this conversation as resolved.
Outdated
([#5063](https://github.com/Microsoft/vscode-python/issues/5063))


## 2019.3.1 (28 March 2019)

### Enhancements
Expand Down
4 changes: 4 additions & 0 deletions src/client/common/installer/moduleInstaller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,15 @@ import { STANDARD_OUTPUT_CHANNEL } from '../constants';
import { ITerminalServiceFactory } from '../terminal/types';
import { ExecutionInfo, IConfigurationService, IOutputChannel } from '../types';
import { noop } from '../utils/misc';
import { sendTelemetryEvent } from '../../telemetry';
import { EventName } from '../../telemetry/constants';

@injectable()
export abstract class ModuleInstaller {
public abstract get displayName(): string
constructor(protected serviceContainer: IServiceContainer) { }
public async installModule(name: string, resource?: vscode.Uri): Promise<void> {
sendTelemetryEvent(EventName.PYTHON_INSTALL_PACKAGE, undefined, { installer: this.displayName });
const executionInfo = await this.getExecutionInfo(name, resource);
const terminalService = this.serviceContainer.get<ITerminalServiceFactory>(ITerminalServiceFactory).getTerminalService(resource);

Expand Down
1 change: 1 addition & 0 deletions src/client/telemetry/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ export enum EventName {
REFACTOR_EXTRACT_FUNCTION = 'REFACTOR_EXTRACT_FUNCTION',
REPL = 'REPL',
PYTHON_INTERPRETER = 'PYTHON_INTERPRETER',
PYTHON_INSTALL_PACKAGE = 'PYTHON_INSTALL_PACKAGE',
PYTHON_INTERPRETER_DISCOVERY = 'PYTHON_INTERPRETER_DISCOVERY',
PYTHON_INTERPRETER_AUTO_SELECTION = 'PYTHON_INTERPRETER_AUTO_SELECTION',
PYTHON_INTERPRETER_ACTIVATION_ENVIRONMENT_VARIABLES = 'PYTHON_INTERPRETER_ACTIVATION_ENVIRONMENT_VARIABLES',
Expand Down
2 changes: 1 addition & 1 deletion src/client/telemetry/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@ export interface IEventNamePropertyMapping {
[EventName.HOVER_DEFINITION]: never | undefined;
[EventName.KNOWN_IMPORT_FROM_FILE]: { import: string };
[EventName.KNOWN_IMPORT_FROM_EXECUTION]: { import: string };
[EventName.LINTER_NOT_INSTALLED_PROMPT]: LinterInstallPromptTelemetry;
[EventName.PYTHON_INSTALL_PACKAGE]: { installer: string };
[EventName.LINTING]: LintingTelemetry;
[EventName.PLATFORM_INFO]: Platform;
[EventName.PYTHON_INTERPRETER]: PythonInterpreterTelemetry;
Expand Down