Skip to content

Commit 216e0f0

Browse files
committed
add telemetry event for no-config debugging
1 parent 8201ced commit 216e0f0

File tree

3 files changed

+13
-0
lines changed

3 files changed

+13
-0
lines changed

src/extension/noConfigDebugInit.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ import {
1414
} from 'vscode';
1515
import { createFileSystemWatcher, debugStartDebugging } from './utils';
1616
import { traceError, traceVerbose } from './common/log/logging';
17+
import { sendTelemetryEvent } from './telemetry';
18+
import { EventName } from './telemetry/constants';
1719

1820
/**
1921
* Registers the configuration-less debugging setup for the extension.
@@ -84,6 +86,7 @@ export async function registerNoConfigDebug(
8486
// create file system watcher for the debuggerAdapterEndpointFolder for when the communication port is written
8587
const fileSystemWatcher = createFileSystemWatcher(new RelativePattern(tempDirPath, '**/*'));
8688
const fileCreationEvent = fileSystemWatcher.onDidCreate(async (uri) => {
89+
sendTelemetryEvent(EventName.DEBUGGER_NO_CONFIG_DEBUGGING);
8790
const filePath = uri.fsPath;
8891
fs.readFile(filePath, (err, data) => {
8992
const dataParse = data.toString();

src/extension/telemetry/constants.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,5 @@ export enum EventName {
2424
USE_REPORT_ISSUE_COMMAND = 'USE_REPORT_ISSUE_COMMAND',
2525
DEBUGGER_PYTHON_37_DEPRECATED = 'DEBUGGER_PYTHON_37_DEPRECATED',
2626
DEBUGGER_SHOW_PYTHON_INLINE_VALUES = 'DEBUGGER_SHOW_PYTHON_INLINE_VALUES',
27+
DEBUGGER_NO_CONFIG_DEBUGGING = 'DEBUGGER_NO_CONFIG_DEBUGGING',
2728
}

src/extension/telemetry/index.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -690,4 +690,13 @@ export interface IEventNamePropertyMapping {
690690
"DEBUGGER_SHOW_PYTHON_INLINE_VALUES" : { "owner": "paulacamargo25" }
691691
*/
692692
[EventName.DEBUGGER_SHOW_PYTHON_INLINE_VALUES]: never | undefined;
693+
694+
695+
/**
696+
* Telemetry event sent when no-config debugging is used.
697+
*/
698+
/* __GDPR__
699+
"DEBUGGER_NO_CONFIG_DEBUGGING" : { "owner": "eleanorjboyd" }
700+
*/
701+
[EventName.DEBUGGER_NO_CONFIG_DEBUGGING]: never | undefined;
693702
}

0 commit comments

Comments
 (0)