Add basic telemetry to WindowWalker (#1925)

This commit is contained in:
Enrico Giordani
2020-04-03 22:31:43 +02:00
committed by GitHub
parent 2806c386d3
commit c3a98b265f
3 changed files with 6 additions and 3 deletions

View File

@@ -143,6 +143,7 @@ public:
m_hProcess = sei.hProcess;
m_enabled = true;
Trace::EnableWindowWalker(true);
}
// Disable the powertoy
@@ -154,6 +155,7 @@ public:
}
m_enabled = false;
Trace::EnableWindowWalker(false);
}
// Returns if the powertoys is enabled

View File

@@ -18,11 +18,12 @@ void Trace::UnregisterProvider()
TraceLoggingUnregister(g_hProvider);
}
void Trace::MyEvent()
void Trace::EnableWindowWalker(const bool enabled) noexcept
{
TraceLoggingWrite(
g_hProvider,
"PowerToyName_MyEvent",
"WindowWalker_EnableWindowWalker",
TraceLoggingBoolean(enabled, "Enabled"),
ProjectTelemetryPrivacyDataTag(ProjectTelemetryTag_ProductAndServicePerformance),
TraceLoggingBoolean(TRUE, "UTCReplace_AppSessionGuid"),
TraceLoggingKeyword(PROJECT_KEYWORD_MEASURE));

View File

@@ -5,5 +5,5 @@ class Trace
public:
static void RegisterProvider();
static void UnregisterProvider();
static void MyEvent();
static void EnableWindowWalker(const bool enabled) noexcept;
};