diff --git a/src/extension/noConfigDebugInit.ts b/src/extension/noConfigDebugInit.ts index f9787d76..4962abe5 100644 --- a/src/extension/noConfigDebugInit.ts +++ b/src/extension/noConfigDebugInit.ts @@ -16,6 +16,7 @@ import { createFileSystemWatcher, debugStartDebugging } from './utils'; import { traceError, traceVerbose } from './common/log/logging'; import { sendTelemetryEvent } from './telemetry'; import { EventName } from './telemetry/constants'; +import { TriggerType } from './types'; /** * Registers the configuration-less debugging setup for the extension. @@ -86,7 +87,10 @@ export async function registerNoConfigDebug( // create file system watcher for the debuggerAdapterEndpointFolder for when the communication port is written const fileSystemWatcher = createFileSystemWatcher(new RelativePattern(tempDirPath, '**/*')); const fileCreationEvent = fileSystemWatcher.onDidCreate(async (uri) => { - sendTelemetryEvent(EventName.DEBUGGER_NO_CONFIG_DEBUGGING); + sendTelemetryEvent(EventName.DEBUG_SESSION_START, undefined, { + trigger: 'noConfig' as TriggerType, + }); + const filePath = uri.fsPath; fs.readFile(filePath, (err, data) => { const dataParse = data.toString(); diff --git a/src/extension/telemetry/constants.ts b/src/extension/telemetry/constants.ts index e8a55d2d..94ff6643 100644 --- a/src/extension/telemetry/constants.ts +++ b/src/extension/telemetry/constants.ts @@ -24,5 +24,4 @@ export enum EventName { USE_REPORT_ISSUE_COMMAND = 'USE_REPORT_ISSUE_COMMAND', DEBUGGER_PYTHON_37_DEPRECATED = 'DEBUGGER_PYTHON_37_DEPRECATED', DEBUGGER_SHOW_PYTHON_INLINE_VALUES = 'DEBUGGER_SHOW_PYTHON_INLINE_VALUES', - DEBUGGER_NO_CONFIG_DEBUGGING = 'DEBUGGER_NO_CONFIG_DEBUGGING', } diff --git a/src/extension/telemetry/index.ts b/src/extension/telemetry/index.ts index cbd34467..5be026fe 100644 --- a/src/extension/telemetry/index.ts +++ b/src/extension/telemetry/index.ts @@ -303,6 +303,7 @@ export interface IEventNamePropertyMapping { * - `launch`: Launch/start new code and debug it. * - `attach`: Attach to an exiting python process (remote debugging). * - `test`: Debugging python tests. + * - `noConfig`: No config debugging. * * @type {TriggerType} */ @@ -690,12 +691,4 @@ export interface IEventNamePropertyMapping { "DEBUGGER_SHOW_PYTHON_INLINE_VALUES" : { "owner": "eleanorjboyd" } */ [EventName.DEBUGGER_SHOW_PYTHON_INLINE_VALUES]: never | undefined; - - /** - * Telemetry event sent when no-config debugging is used. - */ - /* __GDPR__ - "DEBUGGER_NO_CONFIG_DEBUGGING" : { "owner": "eleanorjboyd" } - */ - [EventName.DEBUGGER_NO_CONFIG_DEBUGGING]: never | undefined; } diff --git a/src/extension/types.ts b/src/extension/types.ts index 10e89edf..68a5f187 100644 --- a/src/extension/types.ts +++ b/src/extension/types.ts @@ -147,7 +147,7 @@ export interface DebugConfigurationArguments extends LaunchRequestArguments, Att export type ConsoleType = 'internalConsole' | 'integratedTerminal' | 'externalTerminal'; -export type TriggerType = 'launch' | 'attach' | 'test'; +export type TriggerType = 'launch' | 'attach' | 'test' | 'noConfig'; export type IStartupDurations = Record< 'totalNonBlockingActivateTime' | 'totalActivateTime' | 'startActivateTime' | 'codeLoadingTime',