Add targetPopulation field to telemetry (#8703)

This commit is contained in:
Colen Garoutte-Carson 2022-01-20 12:09:17 -08:00 коммит произвёл GitHub
Родитель d0ffef78f1
Коммит 32e2c38fc4
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
1 изменённых файлов: 15 добавлений и 0 удалений

Просмотреть файл

@ -17,6 +17,7 @@ import { PlatformInformation } from './platform';
import { CppTools1 } from './cppTools1'; import { CppTools1 } from './cppTools1';
import { CppSettings } from './LanguageServer/settings'; import { CppSettings } from './LanguageServer/settings';
import { PersistentState } from './LanguageServer/persistentState'; import { PersistentState } from './LanguageServer/persistentState';
import { TargetPopulation } from 'vscode-tas-client';
const cppTools: CppTools1 = new CppTools1(); const cppTools: CppTools1 = new CppTools1();
let languageServiceDisabled: boolean = false; let languageServiceDisabled: boolean = false;
@ -126,6 +127,20 @@ function sendTelemetry(info: PlatformInformation): void {
} }
telemetryProperties['osArchitecture'] = os.arch(); telemetryProperties['osArchitecture'] = os.arch();
telemetryProperties['infoArchitecture'] = info.architecture; telemetryProperties['infoArchitecture'] = info.architecture;
const targetPopulation: TargetPopulation = util.getCppToolsTargetPopulation();
switch (targetPopulation) {
case TargetPopulation.Public:
telemetryProperties['targetPopulation'] = "Public";
break;
case TargetPopulation.Internal:
telemetryProperties['targetPopulation'] = "Internal";
break;
case TargetPopulation.Insiders:
telemetryProperties['targetPopulation'] = "Insiders";
break;
default:
break;
}
Telemetry.logDebuggerEvent("acquisition", telemetryProperties); Telemetry.logDebuggerEvent("acquisition", telemetryProperties);
} }