Skip to content

Commit 6afaa10

Browse files
authored
add telemetry event for no-config debugging (microsoft#629)
* add telemetry event for no-config debugging * formatting
1 parent 92766cd commit 6afaa10

File tree

3 files changed

+12
-0
lines changed

3 files changed

+12
-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: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -690,4 +690,12 @@ export interface IEventNamePropertyMapping {
690690
"DEBUGGER_SHOW_PYTHON_INLINE_VALUES" : { "owner": "eleanorjboyd" }
691691
*/
692692
[EventName.DEBUGGER_SHOW_PYTHON_INLINE_VALUES]: never | undefined;
693+
694+
/**
695+
* Telemetry event sent when no-config debugging is used.
696+
*/
697+
/* __GDPR__
698+
"DEBUGGER_NO_CONFIG_DEBUGGING" : { "owner": "eleanorjboyd" }
699+
*/
700+
[EventName.DEBUGGER_NO_CONFIG_DEBUGGING]: never | undefined;
693701
}

0 commit comments

Comments
 (0)