-
Notifications
You must be signed in to change notification settings - Fork 7.6k
[Light Switch] Adding telemetry events #44241
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
base: main
Are you sure you want to change the base?
Conversation
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR adds comprehensive telemetry tracking to the Light Switch module to monitor user engagement with various features. The implementation follows PowerToys' telemetry patterns using TraceBase and TraceLoggingWriteWrapper, ensuring events respect privacy settings. Telemetry events are triggered only when settings change or when users invoke actions.
Key changes:
- Added new telemetry infrastructure in LightSwitchService with trace.h/trace.cpp files
- Integrated telemetry calls in LoadSettings to track schedule mode and theme target changes
- Added telemetry in module interface to track enable/disable state and shortcut invocations
- Updated DATA_AND_PRIVACY.md with Light Switch telemetry event documentation
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| src/modules/LightSwitch/LightSwitchService/trace.h | Defines telemetry class structure for Light Switch events, inheriting from TraceBase |
| src/modules/LightSwitch/LightSwitchService/trace.cpp | Implements four telemetry events: Enable, ShortcutInvoked, ScheduleModeToggled, and ThemeTargetChanged |
| src/modules/LightSwitch/LightSwitchService/LightSwitchSettings.cpp | Integrates telemetry calls when schedule mode or theme target settings change |
| src/modules/LightSwitch/LightSwitchModuleInterface/dllmain.cpp | Adds telemetry tracking for module enable/disable and shortcut invocations |
| DATA_AND_PRIVACY.md | Documents the four new telemetry events with descriptions matching the implementation |
|
You could use Telemetry Real-Time Tool to verify the event actually fires and the schema is expected, and after that done, I can approve this |
This comment has been minimized.
This comment has been minimized.
vanzue
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, make sure these events can be found in the windows telemetry
Adding events to track the following:
The above events that are related to Light Switch settings are tracked in the "LoadSettings" function inside the service but only if the value has changed. The Enabled event as well as the Shortcut event are tracked in the module interface.