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
80 changes: 0 additions & 80 deletions src/client/common/application/debugSessionTelemetry.ts

This file was deleted.

5 changes: 0 additions & 5 deletions src/client/common/serviceRegistry.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ import { CommandManager } from './application/commandManager';
import { ReloadVSCodeCommandHandler } from './application/commands/reloadCommand';
import { ReportIssueCommandHandler } from './application/commands/reportIssueCommand';
import { DebugService } from './application/debugService';
import { DebugSessionTelemetry } from './application/debugSessionTelemetry';
import { DocumentManager } from './application/documentManager';
import { Extensions } from './application/extensions';
import { LanguageService } from './application/languageService';
Expand Down Expand Up @@ -189,8 +188,4 @@ export function registerTypes(serviceManager: IServiceManager): void {
IExtensionSingleActivationService,
ReportIssueCommandHandler,
);
serviceManager.addSingleton<IExtensionSingleActivationService>(
IExtensionSingleActivationService,
DebugSessionTelemetry,
);
}
7 changes: 0 additions & 7 deletions src/client/debugger/extension/adapter/factory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@ import { EXTENSION_ROOT_DIR } from '../../../constants';
import { IInterpreterService } from '../../../interpreter/contracts';
import { traceError, traceLog, traceVerbose } from '../../../logging';
import { PythonEnvironment } from '../../../pythonEnvironments/info';
import { sendTelemetryEvent } from '../../../telemetry';
import { EventName } from '../../../telemetry/constants';
import { AttachRequestArguments, LaunchRequestArguments } from '../../types';
import { IDebugAdapterDescriptorFactory } from '../types';
import { showErrorMessage } from '../../../common/vscodeApis/windowApis';
Expand Down Expand Up @@ -76,10 +74,6 @@ export class DebugAdapterDescriptorFactory implements IDebugAdapterDescriptorFac

const command = await this.getDebugAdapterPython(configuration, session.workspaceFolder);
if (command.length !== 0) {
if (configuration.request === 'attach' && configuration.processId !== undefined) {
sendTelemetryEvent(EventName.DEBUGGER_ATTACH_TO_LOCAL_PROCESS);
}

const executable = command.shift() ?? 'python';

// "logToFile" is not handled directly by the adapter - instead, we need to pass
Expand All @@ -100,7 +94,6 @@ export class DebugAdapterDescriptorFactory implements IDebugAdapterDescriptorFac

const args = command.concat([debuggerAdapterPathToUse, ...logArgs]);
traceLog(`DAP Server launched with command: ${executable} ${args.join(' ')}`);
sendTelemetryEvent(EventName.DEBUG_ADAPTER_USING_WHEELS_PATH, undefined, { usingWheels: true });
return new DebugAdapterExecutable(executable, args);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,6 @@ export class AttachConfigurationResolver extends BaseConfigurationResolver<Attac
debugConfiguration.remoteRoot,
workspaceFolder,
);
AttachConfigurationResolver.sendTelemetry('attach', debugConfiguration);
}

// eslint-disable-next-line class-methods-use-this
Expand Down
33 changes: 0 additions & 33 deletions src/client/debugger/extension/configuration/resolvers/base.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,6 @@ import {
getWorkspaceFolders,
} from '../../../../common/vscodeApis/workspaceApis';
import { IInterpreterService } from '../../../../interpreter/contracts';
import { sendTelemetryEvent } from '../../../../telemetry';
import { EventName } from '../../../../telemetry/constants';
import { DebuggerTelemetry } from '../../../../telemetry/types';
import { AttachRequestArguments, DebugOptions, LaunchRequestArguments, PathMapping } from '../../../types';
import { PythonPathSource } from '../../types';
import { IDebugConfigurationResolver } from '../types';
Expand Down Expand Up @@ -228,34 +225,4 @@ export abstract class BaseConfigurationResolver<T extends DebugConfiguration>
): boolean {
return !!(debugConfiguration.module && debugConfiguration.module.toUpperCase() === 'FLASK');
}

protected static sendTelemetry(
trigger: 'launch' | 'attach' | 'test',
debugConfiguration: Partial<LaunchRequestArguments & AttachRequestArguments>,
): void {
const name = debugConfiguration.name || '';
const moduleName = debugConfiguration.module || '';
const telemetryProps: DebuggerTelemetry = {
trigger,
console: debugConfiguration.console,
hasEnvVars: typeof debugConfiguration.env === 'object' && Object.keys(debugConfiguration.env).length > 0,
django: !!debugConfiguration.django,
fastapi: BaseConfigurationResolver.isDebuggingFastAPI(debugConfiguration),
flask: BaseConfigurationResolver.isDebuggingFlask(debugConfiguration),
hasArgs: Array.isArray(debugConfiguration.args) && debugConfiguration.args.length > 0,
isLocalhost: BaseConfigurationResolver.isLocalHost(debugConfiguration.host),
isModule: moduleName.length > 0,
isSudo: !!debugConfiguration.sudo,
jinja: !!debugConfiguration.jinja,
pyramid: !!debugConfiguration.pyramid,
stopOnEntry: !!debugConfiguration.stopOnEntry,
showReturnValue: !!debugConfiguration.showReturnValue,
subProcess: !!debugConfiguration.subProcess,
watson: name.toLowerCase().indexOf('watson') >= 0,
pyspark: name.toLowerCase().indexOf('pyspark') >= 0,
gevent: name.toLowerCase().indexOf('gevent') >= 0,
scrapy: moduleName.toLowerCase() === 'scrapy',
};
sendTelemetryEvent(EventName.DEBUGGER, undefined, telemetryProps);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import { EnvironmentVariables } from '../../../../common/variables/types';
import { IEnvironmentActivationService } from '../../../../interpreter/activation/types';
import { IInterpreterService } from '../../../../interpreter/contracts';
import { DebuggerTypeName } from '../../../constants';
import { DebugOptions, DebugPurpose, LaunchRequestArguments } from '../../../types';
import { DebugOptions, LaunchRequestArguments } from '../../../types';
import { BaseConfigurationResolver } from './base';
import { getProgram, IDebugEnvironmentVariablesService } from './helper';
import {
Expand Down Expand Up @@ -194,11 +194,6 @@ export class LaunchConfigurationResolver extends BaseConfigurationResolver<Launc
}
debugConfiguration.pathMappings = pathMappings.length > 0 ? pathMappings : undefined;
}
const trigger =
debugConfiguration.purpose?.includes(DebugPurpose.DebugTest) || debugConfiguration.request === 'test'
? 'test'
: 'launch';
LaunchConfigurationResolver.sendTelemetry(trigger, debugConfiguration);
}

protected async validateLaunchConfiguration(
Expand Down
1 change: 0 additions & 1 deletion src/client/debugger/extension/debugCommands.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ export class DebugCommands implements IExtensionSingleActivationService {
public activate(): Promise<void> {
this.disposables.push(
this.commandManager.registerCommand(Commands.Debug_In_Terminal, async (file?: Uri) => {
sendTelemetryEvent(EventName.DEBUG_IN_TERMINAL_BUTTON);
const interpreter = await this.interpreterService.getActiveInterpreter(file);
if (!interpreter) {
this.commandManager.executeCommand(Commands.TriggerEnvironmentSelection, file).then(noop, noop);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,7 @@
import { inject, injectable } from 'inversify';
import { IDebugService } from '../../../common/application/types';
import { DebugConfiguration, DebugSession, l10n, WorkspaceFolder, DebugSessionOptions } from 'vscode';
import { noop } from '../../../common/utils/misc';
import { captureTelemetry } from '../../../telemetry';
import { EventName } from '../../../telemetry/constants';
import { noop } from '../../../common/utils/misc';
import { AttachRequestArguments } from '../../types';
import { IChildProcessAttachService } from './types';
import { showErrorMessage } from '../../../common/vscodeApis/windowApis';
Expand All @@ -22,7 +20,6 @@ import { getWorkspaceFolders } from '../../../common/vscodeApis/workspaceApis';
export class ChildProcessAttachService implements IChildProcessAttachService {
constructor(@inject(IDebugService) private readonly debugService: IDebugService) {}

@captureTelemetry(EventName.DEBUGGER_ATTACH_TO_CHILD_PROCESS)
public async attach(data: AttachRequestArguments & DebugConfiguration, parentSession: DebugSession): Promise<void> {
const debugConfig: AttachRequestArguments & DebugConfiguration = data;
const folder = this.getRelatedWorkspaceFolder(debugConfig);
Expand Down
9 changes: 0 additions & 9 deletions src/client/telemetry/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,15 +39,6 @@ export enum EventName {
EXECUTION_CODE = 'EXECUTION_CODE',
EXECUTION_DJANGO = 'EXECUTION_DJANGO',

DEBUG_IN_TERMINAL_BUTTON = 'DEBUG.IN_TERMINAL',
DEBUG_ADAPTER_USING_WHEELS_PATH = 'DEBUG_ADAPTER.USING_WHEELS_PATH',
DEBUG_SESSION_ERROR = 'DEBUG_SESSION.ERROR',
DEBUG_SESSION_START = 'DEBUG_SESSION.START',
DEBUG_SESSION_STOP = 'DEBUG_SESSION.STOP',
DEBUG_SESSION_USER_CODE_RUNNING = 'DEBUG_SESSION.USER_CODE_RUNNING',
DEBUGGER = 'DEBUGGER',
DEBUGGER_ATTACH_TO_CHILD_PROCESS = 'DEBUGGER.ATTACH_TO_CHILD_PROCESS',
DEBUGGER_ATTACH_TO_LOCAL_PROCESS = 'DEBUGGER.ATTACH_TO_LOCAL_PROCESS',

// Python testing specific telemetry
UNITTEST_CONFIGURING = 'UNITTEST.CONFIGURING',
Expand Down
Loading
Loading