Inking: add usage, reliability and performance telemetry - #11880
Closed
Nitin Chaudhary (Nitin-100) wants to merge 1 commit into
Closed
Nitin Chaudhary (Nitin-100) wants to merge 1 commit into
Nitin Chaudhary (Nitin-100) wants to merge 1 commit into
Conversation
Adds five events for the inking stack. There was no prior art to mirror: UWP and
WinUI 2 shipped no ink telemetry (the UWP InkPresenter/InkToolbar live in the OS
repo and are not instrumented), so these signals are defined fresh.
InkCanvas_Initialization attach start, then success or failure with
the stage reached and the HRESULT
InkCanvas_InitializationLatency elapsed time for a successful attach
InkCanvas_UsageSummary compositor engine, input device mask,
high-contrast adjustment
InkPresenter_CustomDryingActivation activation result, emitted from
ActivateCustomDrying itself
InkToolbar_UsageSummary initial controls, orientation, active tool,
attached target
CompositorEngine appears on three of the five. InkCanvas forks between a system
splice and a lifted ContentExternalOutputLink bridge, the two paths behave
differently, and we currently have no way to tell what share of users are on
each. That is the signal this is primarily for.
Custom drying is reported as an event at its call site rather than as a field on
the usage summary: ActivateCustomDrying must be called before the first stroke
and its ordering against Loaded is not guaranteed, so a snapshot taken at attach
time would under-report it. Reporting at the call site also captures the
E_ILLEGAL_METHOD_CALL failure apps hit when they activate too late.
Uses the existing g_hTelemetryProvider rather than a new provider, matching how
WebView2 and NavigationView instrument. KEYWORD_INKTOOLBAR was already reserved
and unused; KEYWORD_INKCANVAS is newly allocated.
No stroke data, coordinates, pressure, tilt or text is collected - every field is
an enum, a flag or a duration. Instance ids are process-local counters used only
to match a start to its outcome.
docs/Telemetry.md states the signals and the measures they feed;
docs/OpenQuestions.md lists the decisions needed before production collection.
Contributor
Author
|
Superseded by #11891. Same commit, but raised from a branch on this repo instead of a fork so the ADO |
Nitin Chaudhary (Nitin-100)
deleted the
user/nitinc/inking-telemetry
branch
September 15, 2026 04:55
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The WinUI 3 inking stack ships with no telemetry. We cannot answer basic questions about it: does an
InkCanvasinitialise successfully, how long does that take, how is it configured, and — the one that matters most right now — which composition engine are real users actually on?There is no prior art to mirror. UWP and WinUI 2 shipped no ink telemetry; the UWP
InkPresenter/InkToolbarlive in the OS repo and are not instrumented. These signals are defined fresh, following the shape used by the Charts telemetry PR (usage / reliability / performance).Five events
InkCanvas_InitializationHRESULTInkCanvas_InitializationLatencyInkCanvas_UsageSummaryInkPresenter_CustomDryingActivationActivateCustomDryingitselfInkToolbar_UsageSummaryWhy
CompositorEngineis on three of the fiveInkCanvasforks on the composition engine: a system-backed process splices the ink visual under a lifted MUC visual, while a lifted process bridges it throughContentExternalOutputLink. The two paths differ materially in rendering and input behaviour, and the system path depends on OS support that is not yet broadly available.We currently have no way to tell what share of users land on each path. That is the primary motivation for this change.
Design notes for review
Custom drying is an event, not a field. It is reported from
ActivateCustomDryingrather than sampled onto the usage summary.ActivateCustomDryingmust be called before the first stroke and its ordering againstLoadedis not guaranteed, so a snapshot taken at attach time would under-report adoption. Reporting at the call site also captures theE_ILLEGAL_METHOD_CALLfailure apps hit when they activate too late — a reliability signal that a state snapshot would have missed entirely.Failures are captured without changing control flow.
OnLoadedcan throw from severalcheck_hresultpaths, so the attach sequence is bracketed withwil::scope_exit; a throw anywhere in it is still recorded as a failure with the stage reached.Uses the existing provider.
g_hTelemetryProviderwithTelemetryPrivacyDataTagandMICROSOFT_KEYWORD_MEASURES, matching how WebView2 and NavigationView instrument, rather than defining a new provider.KEYWORD_INKTOOLBARwas already reserved and unused;KEYWORD_INKCANVASis newly allocated.No product API was added for telemetry.
InkPresenter.his untouched.Privacy
No stroke data, coordinates, pressure, tilt, timestamps of user input, bitmap content or text of any kind. Every field is an enum, a flag or a duration. Instance ids are process-local counters used only to match a start to its outcome; they are not stable across runs and carry no user or device identity.
Performance events use
PDT_ProductAndServicePerformance; usage events usePDT_ProductAndServiceUsage.Docs
controls/dev/InkCanvas/docs/Telemetry.md— the signals, the measures they feed, and how to read the resultscontrols/dev/InkCanvas/docs/OpenQuestions.md— decisions needed before production collectionPlease review whether each signal is necessary, and whether its boundary and population are right.
How verified — and what is NOT yet verified
Verified: the product builds clean with these changes.
InkTelemetry.obj,InkCanvas.obj,InkPresenter.obj,InkToolbar.objandMicrosoft.UI.Xaml.Controls.dllwere all produced after the final source edit, with zero errors.Not yet verified: the events have not been observed firing. Runtime ETW capture is still outstanding. I could not build a host app against this branch locally —
MUXControlsTestApprestore fails with401 UnauthorizedpullingMicrosoft.NET.ILLink.Tasksfrom theWinUI-Dependenciesfeed.I am calling this out rather than implying coverage I do not have. The design questions above stand on their own; I will attach a decoded capture (provider
Microsoft.UI.Xaml.Controls, filtered onKEYWORD_INKCANVAS/KEYWORD_INKTOOLBAR, showing all five events and their fields) once the app can be built, and would not expect this to merge before then.