Skip to content

Commit cd992fc

Browse files
authored
remove stale debugging telemetry (#24842)
1 parent 2698d5a commit cd992fc

File tree

13 files changed

+1
-479
lines changed

13 files changed

+1
-479
lines changed

src/client/common/application/debugSessionTelemetry.ts

Lines changed: 0 additions & 80 deletions
This file was deleted.

src/client/common/serviceRegistry.ts

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ import { CommandManager } from './application/commandManager';
2828
import { ReloadVSCodeCommandHandler } from './application/commands/reloadCommand';
2929
import { ReportIssueCommandHandler } from './application/commands/reportIssueCommand';
3030
import { DebugService } from './application/debugService';
31-
import { DebugSessionTelemetry } from './application/debugSessionTelemetry';
3231
import { DocumentManager } from './application/documentManager';
3332
import { Extensions } from './application/extensions';
3433
import { LanguageService } from './application/languageService';
@@ -189,8 +188,4 @@ export function registerTypes(serviceManager: IServiceManager): void {
189188
IExtensionSingleActivationService,
190189
ReportIssueCommandHandler,
191190
);
192-
serviceManager.addSingleton<IExtensionSingleActivationService>(
193-
IExtensionSingleActivationService,
194-
DebugSessionTelemetry,
195-
);
196191
}

src/client/debugger/extension/adapter/factory.ts

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,6 @@ import { EXTENSION_ROOT_DIR } from '../../../constants';
1717
import { IInterpreterService } from '../../../interpreter/contracts';
1818
import { traceError, traceLog, traceVerbose } from '../../../logging';
1919
import { PythonEnvironment } from '../../../pythonEnvironments/info';
20-
import { sendTelemetryEvent } from '../../../telemetry';
21-
import { EventName } from '../../../telemetry/constants';
2220
import { AttachRequestArguments, LaunchRequestArguments } from '../../types';
2321
import { IDebugAdapterDescriptorFactory } from '../types';
2422
import { showErrorMessage } from '../../../common/vscodeApis/windowApis';
@@ -76,10 +74,6 @@ export class DebugAdapterDescriptorFactory implements IDebugAdapterDescriptorFac
7674

7775
const command = await this.getDebugAdapterPython(configuration, session.workspaceFolder);
7876
if (command.length !== 0) {
79-
if (configuration.request === 'attach' && configuration.processId !== undefined) {
80-
sendTelemetryEvent(EventName.DEBUGGER_ATTACH_TO_LOCAL_PROCESS);
81-
}
82-
8377
const executable = command.shift() ?? 'python';
8478

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

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

src/client/debugger/extension/configuration/resolvers/attach.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,6 @@ export class AttachConfigurationResolver extends BaseConfigurationResolver<Attac
8787
debugConfiguration.remoteRoot,
8888
workspaceFolder,
8989
);
90-
AttachConfigurationResolver.sendTelemetry('attach', debugConfiguration);
9190
}
9291

9392
// eslint-disable-next-line class-methods-use-this

src/client/debugger/extension/configuration/resolvers/base.ts

Lines changed: 0 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,6 @@ import {
1313
getWorkspaceFolders,
1414
} from '../../../../common/vscodeApis/workspaceApis';
1515
import { IInterpreterService } from '../../../../interpreter/contracts';
16-
import { sendTelemetryEvent } from '../../../../telemetry';
17-
import { EventName } from '../../../../telemetry/constants';
18-
import { DebuggerTelemetry } from '../../../../telemetry/types';
1916
import { AttachRequestArguments, DebugOptions, LaunchRequestArguments, PathMapping } from '../../../types';
2017
import { PythonPathSource } from '../../types';
2118
import { IDebugConfigurationResolver } from '../types';
@@ -228,34 +225,4 @@ export abstract class BaseConfigurationResolver<T extends DebugConfiguration>
228225
): boolean {
229226
return !!(debugConfiguration.module && debugConfiguration.module.toUpperCase() === 'FLASK');
230227
}
231-
232-
protected static sendTelemetry(
233-
trigger: 'launch' | 'attach' | 'test',
234-
debugConfiguration: Partial<LaunchRequestArguments & AttachRequestArguments>,
235-
): void {
236-
const name = debugConfiguration.name || '';
237-
const moduleName = debugConfiguration.module || '';
238-
const telemetryProps: DebuggerTelemetry = {
239-
trigger,
240-
console: debugConfiguration.console,
241-
hasEnvVars: typeof debugConfiguration.env === 'object' && Object.keys(debugConfiguration.env).length > 0,
242-
django: !!debugConfiguration.django,
243-
fastapi: BaseConfigurationResolver.isDebuggingFastAPI(debugConfiguration),
244-
flask: BaseConfigurationResolver.isDebuggingFlask(debugConfiguration),
245-
hasArgs: Array.isArray(debugConfiguration.args) && debugConfiguration.args.length > 0,
246-
isLocalhost: BaseConfigurationResolver.isLocalHost(debugConfiguration.host),
247-
isModule: moduleName.length > 0,
248-
isSudo: !!debugConfiguration.sudo,
249-
jinja: !!debugConfiguration.jinja,
250-
pyramid: !!debugConfiguration.pyramid,
251-
stopOnEntry: !!debugConfiguration.stopOnEntry,
252-
showReturnValue: !!debugConfiguration.showReturnValue,
253-
subProcess: !!debugConfiguration.subProcess,
254-
watson: name.toLowerCase().indexOf('watson') >= 0,
255-
pyspark: name.toLowerCase().indexOf('pyspark') >= 0,
256-
gevent: name.toLowerCase().indexOf('gevent') >= 0,
257-
scrapy: moduleName.toLowerCase() === 'scrapy',
258-
};
259-
sendTelemetryEvent(EventName.DEBUGGER, undefined, telemetryProps);
260-
}
261228
}

src/client/debugger/extension/configuration/resolvers/launch.ts

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import { EnvironmentVariables } from '../../../../common/variables/types';
1313
import { IEnvironmentActivationService } from '../../../../interpreter/activation/types';
1414
import { IInterpreterService } from '../../../../interpreter/contracts';
1515
import { DebuggerTypeName } from '../../../constants';
16-
import { DebugOptions, DebugPurpose, LaunchRequestArguments } from '../../../types';
16+
import { DebugOptions, LaunchRequestArguments } from '../../../types';
1717
import { BaseConfigurationResolver } from './base';
1818
import { getProgram, IDebugEnvironmentVariablesService } from './helper';
1919
import {
@@ -194,11 +194,6 @@ export class LaunchConfigurationResolver extends BaseConfigurationResolver<Launc
194194
}
195195
debugConfiguration.pathMappings = pathMappings.length > 0 ? pathMappings : undefined;
196196
}
197-
const trigger =
198-
debugConfiguration.purpose?.includes(DebugPurpose.DebugTest) || debugConfiguration.request === 'test'
199-
? 'test'
200-
: 'launch';
201-
LaunchConfigurationResolver.sendTelemetry(trigger, debugConfiguration);
202197
}
203198

204199
protected async validateLaunchConfiguration(

src/client/debugger/extension/debugCommands.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@ export class DebugCommands implements IExtensionSingleActivationService {
3333
public activate(): Promise<void> {
3434
this.disposables.push(
3535
this.commandManager.registerCommand(Commands.Debug_In_Terminal, async (file?: Uri) => {
36-
sendTelemetryEvent(EventName.DEBUG_IN_TERMINAL_BUTTON);
3736
const interpreter = await this.interpreterService.getActiveInterpreter(file);
3837
if (!interpreter) {
3938
this.commandManager.executeCommand(Commands.TriggerEnvironmentSelection, file).then(noop, noop);

src/client/debugger/extension/hooks/childProcessAttachService.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@ import { inject, injectable } from 'inversify';
77
import { IDebugService } from '../../../common/application/types';
88
import { DebugConfiguration, DebugSession, l10n, WorkspaceFolder, DebugSessionOptions } from 'vscode';
99
import { noop } from '../../../common/utils/misc';
10-
import { captureTelemetry } from '../../../telemetry';
11-
import { EventName } from '../../../telemetry/constants';
1210
import { AttachRequestArguments } from '../../types';
1311
import { IChildProcessAttachService } from './types';
1412
import { showErrorMessage } from '../../../common/vscodeApis/windowApis';
@@ -22,7 +20,6 @@ import { getWorkspaceFolders } from '../../../common/vscodeApis/workspaceApis';
2220
export class ChildProcessAttachService implements IChildProcessAttachService {
2321
constructor(@inject(IDebugService) private readonly debugService: IDebugService) {}
2422

25-
@captureTelemetry(EventName.DEBUGGER_ATTACH_TO_CHILD_PROCESS)
2623
public async attach(data: AttachRequestArguments & DebugConfiguration, parentSession: DebugSession): Promise<void> {
2724
const debugConfig: AttachRequestArguments & DebugConfiguration = data;
2825
const folder = this.getRelatedWorkspaceFolder(debugConfig);

src/client/telemetry/constants.ts

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -38,16 +38,6 @@ export enum EventName {
3838
EXECUTION_CODE = 'EXECUTION_CODE',
3939
EXECUTION_DJANGO = 'EXECUTION_DJANGO',
4040

41-
DEBUG_IN_TERMINAL_BUTTON = 'DEBUG.IN_TERMINAL',
42-
DEBUG_ADAPTER_USING_WHEELS_PATH = 'DEBUG_ADAPTER.USING_WHEELS_PATH',
43-
DEBUG_SESSION_ERROR = 'DEBUG_SESSION.ERROR',
44-
DEBUG_SESSION_START = 'DEBUG_SESSION.START',
45-
DEBUG_SESSION_STOP = 'DEBUG_SESSION.STOP',
46-
DEBUG_SESSION_USER_CODE_RUNNING = 'DEBUG_SESSION.USER_CODE_RUNNING',
47-
DEBUGGER = 'DEBUGGER',
48-
DEBUGGER_ATTACH_TO_CHILD_PROCESS = 'DEBUGGER.ATTACH_TO_CHILD_PROCESS',
49-
DEBUGGER_ATTACH_TO_LOCAL_PROCESS = 'DEBUGGER.ATTACH_TO_LOCAL_PROCESS',
50-
5141
// Python testing specific telemetry
5242
UNITTEST_CONFIGURING = 'UNITTEST.CONFIGURING',
5343
UNITTEST_CONFIGURE = 'UNITTEST.CONFIGURE',

0 commit comments

Comments
 (0)