Optional Telemetry Event for Microsoft Store Catalog Installs (msstore Source)#6352
Open
shmuelie wants to merge 10 commits into
Open
Optional Telemetry Event for Microsoft Store Catalog Installs (msstore Source)#6352shmuelie wants to merge 10 commits into
shmuelie wants to merge 10 commits into
Conversation
ReportInstallerResult's success branch fetched Execution::Data::PackageVersion unconditionally to decide whether to emit the msstore install telemetry event. Get<> throws E_NOT_SET when the key is absent, and the --manifest install path (GetManifestFromArg) never adds PackageVersion, so a successful local-manifest install threw at the reporting stage and was reported as an error. Guard the access with Contains(Execution::Data::PackageVersion) before Get, and only fetch the Manifest when actually emitting. Store installs (which always have a PackageVersion) are unaffected; --manifest installs now skip the block instead of throwing. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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.
📖 Description
Adds an optional telemetry event that lets Microsoft Store analytics attribute Store‑catalog
app installs that happen through WinGet.
When WinGet successfully installs an app whose source is the Microsoft Store (
msstore), it nowemits a
StoreExperienceTelemetry-WinGetInstallevent on theMicrosoft-Windows-StoreETWprovider (
{9C2A37F3-E5FD-5CAE-BCD1-43DAFEEE1FF0}). The event carries only the minimum needed forattribution:
pidmsstorepackage identifier)srccn"msstore"Key points:
msstore. The call site is the success path ofReportInstallerResult, gated onPackageVersion->GetSource().IsWellKnownSource(WellKnownSource::MicrosoftStore). Local‑manifestinstalls (which have no
PackageVersion) are guarded withContains(...)so they are unaffected.msstoreitems resolve to a real installertype (
exe/msi) and flow throughReportInstallerResult, so they emit the event.Microsoft-Windows-Storeis registered alongside the existing WinGetprovider, with its own enablement callback (
g_IsStoreTelemetryProviderEnabled) so the Storeevent can be captured independently of the WinGet telemetry provider.
(
m_isSettingEnabled), the runtime toggle (m_isRuntimeEnabled), and initialization state, andis tagged
PDT_ProductAndServicePerformance/MICROSOFT_KEYWORD_CRITICAL_DATA. It records noexecutable paths, usernames, or command‑line arguments.
Files changed
src/AppInstallerCommonCore/Telemetry/TraceLogging.{h,cpp}Microsoft-Windows-Storeprovider + register its enablement callbacksrc/AppInstallerCommonCore/Public/AppInstallerTelemetry.hLogStoreInstallsrc/AppInstallerCommonCore/AppInstallerTelemetry.cppLogStoreInstall(writes the event; updates the telemetry summary when the WinGet provider is enabled)src/AppInstallerCLICore/Workflows/InstallFlow.cppLogStoreInstallon successfulmsstoreinstalls, guarded byContains(PackageVersion)🔗 References
Resolves #6317
🔍 Validation
winget install XPFFH613W8V6LV --accept-package-agreements(OBS Studio — an unpackagedexeStore app). An ETW capture of theMicrosoft-Windows-Storeprovider showedStoreExperienceTelemetry-WinGetInstallwithpid=the Store product ID and
cn=msstore.msstoresources, and none for a failed install (the eventis only reached on the success path).
toggle.
✅ Checklist
📋 Issue Type
Microsoft Reviewers: Open in CodeFlow