add basic compiler selection telemetry (#10502)

* change description for natvisDiagnostics

* add telemtry

* resolve telemtry
This commit is contained in:
browntarik
2023-02-09 15:42:25 -08:00
committed by GitHub
parent e4696c5dec
commit 1e779a5a3c
+19
View File
@@ -971,6 +971,25 @@ export class DefaultClient implements Client {
paths.push(localize("installCompiler.string", "Help me install a compiler"));
paths.push(localize("noConfig.string", "Do not configure a compiler (not recommended)"));
const index: number = await this.showSelectDefaultCompiler(paths);
let action: string;
switch (index) {
case -1:
action = 'escaped';
break;
case paths.length - 1:
action = 'disable';
break;
case paths.length - 2:
action = 'help';
break;
case paths.length - 3:
action = 'browse';
break;
default:
action = 'select compiler';
break;
}
telemetry.logLanguageServerEvent('compilerSelection', { action });
if (index === -1) {
if (showSecondPrompt) {
this.showPrompt(selectCompiler, true);