[VCM]Add enabled telemetry (#32094)

This commit is contained in:
Jaime Bernardo 2024-03-28 14:35:12 +00:00 committed by GitHub
parent 576e2a7d2c
commit 054c5c833b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 14 additions and 0 deletions

View File

@ -611,6 +611,7 @@ void VideoConferenceModule::enable()
#endif #endif
hook_handle = SetWindowsHookEx(WH_KEYBOARD_LL, LowLevelKeyboardProc, GetModuleHandle(NULL), NULL); hook_handle = SetWindowsHookEx(WH_KEYBOARD_LL, LowLevelKeyboardProc, GetModuleHandle(NULL), NULL);
} }
Trace::EnableVideoConference(true);
} }
void VideoConferenceModule::unmuteAll() void VideoConferenceModule::unmuteAll()
@ -664,6 +665,7 @@ void VideoConferenceModule::disable()
_enabled = false; _enabled = false;
} }
Trace::EnableVideoConference(false);
} }
bool VideoConferenceModule::is_enabled() bool VideoConferenceModule::is_enabled()

View File

@ -19,6 +19,17 @@ void Trace::UnregisterProvider() noexcept
TraceLoggingUnregister(g_hProvider); TraceLoggingUnregister(g_hProvider);
} }
// Log if the user has VCM enabled or disabled
void Trace::EnableVideoConference(const bool enabled) noexcept
{
TraceLoggingWrite(
g_hProvider,
"VideoConference_EnableVideoConference",
ProjectTelemetryPrivacyDataTag(ProjectTelemetryTag_ProductAndServicePerformance),
TraceLoggingKeyword(PROJECT_KEYWORD_MEASURE),
TraceLoggingBoolean(enabled, "Enabled"));
}
void Trace::SettingsChanged(const struct VideoConferenceSettings& settings) noexcept void Trace::SettingsChanged(const struct VideoConferenceSettings& settings) noexcept
{ {
bool CustomOverlayImage = (settings.imageOverlayPath.length() > 0); bool CustomOverlayImage = (settings.imageOverlayPath.length() > 0);

View File

@ -6,6 +6,7 @@ class Trace
public: public:
static void RegisterProvider() noexcept; static void RegisterProvider() noexcept;
static void UnregisterProvider() noexcept; static void UnregisterProvider() noexcept;
static void EnableVideoConference(const bool enabled) noexcept;
static void SettingsChanged(const struct VideoConferenceSettings &settings) noexcept; static void SettingsChanged(const struct VideoConferenceSettings &settings) noexcept;
static void MicrophoneMuted() noexcept; static void MicrophoneMuted() noexcept;
static void CameraMuted() noexcept; static void CameraMuted() noexcept;