Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add basic telemetry to WindowWalker #1925

Merged
merged 1 commit into from
Apr 3, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/modules/windowwalker/dll/dllmain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,7 @@ class WindowWalker : public PowertoyModuleIface
m_hProcess = sei.hProcess;

m_enabled = true;
Trace::EnableWindowWalker(true);
}

// Disable the powertoy
Expand All @@ -154,6 +155,7 @@ class WindowWalker : public PowertoyModuleIface
}

m_enabled = false;
Trace::EnableWindowWalker(false);
}

// Returns if the powertoys is enabled
Expand Down
5 changes: 3 additions & 2 deletions src/modules/windowwalker/dll/trace.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand Down
2 changes: 1 addition & 1 deletion src/modules/windowwalker/dll/trace.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@ class Trace
public:
static void RegisterProvider();
static void UnregisterProvider();
static void MyEvent();
static void EnableWindowWalker(const bool enabled) noexcept;
};