added telemetry for editor launch event (#1705)

This commit is contained in:
Seraphima Zykova 2020-03-26 13:54:12 +03:00 committed by GitHub
parent 5a5b5292a1
commit f72dd7fdb6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 12 additions and 0 deletions

View File

@ -518,6 +518,7 @@ void FancyZones::ToggleEditor() noexcept
sei.lpParameters = params.c_str();
sei.nShow = SW_SHOWNORMAL;
ShellExecuteEx(&sei);
Trace::FancyZones::EditorLaunched(1);
// Launch the editor on a background thread
// Wait for the editor's process to exit

View File

@ -147,6 +147,16 @@ void Trace::FancyZones::DataChanged() noexcept
TraceLoggingWideString(activeZoneSetInfo.c_str(), "ActiveZoneSetsList"));
}
void Trace::FancyZones::EditorLaunched(int value) noexcept
{
TraceLoggingWrite(
g_hProvider,
"FancyZones_EditorLaunch",
ProjectTelemetryPrivacyDataTag(ProjectTelemetryTag_ProductAndServicePerformance),
TraceLoggingKeyword(PROJECT_KEYWORD_MEASURE),
TraceLoggingInt32(value, "Value"));
}
void Trace::SettingsChanged(const Settings& settings) noexcept
{
const auto& editorHotkey = settings.editorHotkey;

View File

@ -15,6 +15,7 @@ public:
static void EnableFancyZones(bool enabled) noexcept;
static void OnKeyDown(DWORD vkCode, bool win, bool control, bool inMoveSize) noexcept;
static void DataChanged() noexcept;
static void EditorLaunched(int value) noexcept;
};
static void SettingsChanged(const Settings& settings) noexcept;