Skip to content

Commit 1e779a5

Browse files
authored
add basic compiler selection telemetry (#10502)
* change description for natvisDiagnostics * add telemtry * resolve telemtry
1 parent e4696c5 commit 1e779a5

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

Extension/src/LanguageServer/client.ts

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -971,6 +971,25 @@ export class DefaultClient implements Client {
971971
paths.push(localize("installCompiler.string", "Help me install a compiler"));
972972
paths.push(localize("noConfig.string", "Do not configure a compiler (not recommended)"));
973973
const index: number = await this.showSelectDefaultCompiler(paths);
974+
let action: string;
975+
switch (index) {
976+
case -1:
977+
action = 'escaped';
978+
break;
979+
case paths.length - 1:
980+
action = 'disable';
981+
break;
982+
case paths.length - 2:
983+
action = 'help';
984+
break;
985+
case paths.length - 3:
986+
action = 'browse';
987+
break;
988+
default:
989+
action = 'select compiler';
990+
break;
991+
}
992+
telemetry.logLanguageServerEvent('compilerSelection', { action });
974993
if (index === -1) {
975994
if (showSecondPrompt) {
976995
this.showPrompt(selectCompiler, true);

0 commit comments

Comments
 (0)