Skip to content

Optional Telemetry Event for Microsoft Store Catalog Installs (msstore Source)#6352

Open
shmuelie wants to merge 10 commits into
microsoft:masterfrom
shmuelie:user/senglard/Feature6317
Open

Optional Telemetry Event for Microsoft Store Catalog Installs (msstore Source)#6352
shmuelie wants to merge 10 commits into
microsoft:masterfrom
shmuelie:user/senglard/Feature6317

Conversation

@shmuelie

@shmuelie shmuelie commented Jul 6, 2026

Copy link
Copy Markdown

📖 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 now
emits a StoreExperienceTelemetry-WinGetInstall event on the Microsoft-Windows-Store ETW
provider ({9C2A37F3-E5FD-5CAE-BCD1-43DAFEEE1FF0}). The event carries only the minimum needed for
attribution:

Field Value
pid Store product ID (the msstore package identifier)
src Install caller
cn Catalog name — constant "msstore"

Key points:

  • Emitted only on success, only for msstore. The call site is the success path of
    ReportInstallerResult, gated on
    PackageVersion->GetSource().IsWellKnownSource(WellKnownSource::MicrosoftStore). Local‑manifest
    installs (which have no PackageVersion) are guarded with Contains(...) so they are unaffected.
  • Scope: unpackaged (Win32) Store apps. Unpackaged msstore items resolve to a real installer
    type (exe/msi) and flow through ReportInstallerResult, so they emit the event.
  • New dedicated provider. Microsoft-Windows-Store is registered alongside the existing WinGet
    provider, with its own enablement callback (g_IsStoreTelemetryProviderEnabled) so the Store
    event can be captured independently of the WinGet telemetry provider.
  • Privacy‑preserving. The event honors the WinGet telemetry opt‑out
    (m_isSettingEnabled), the runtime toggle (m_isRuntimeEnabled), and initialization state, and
    is tagged PDT_ProductAndServicePerformance / MICROSOFT_KEYWORD_CRITICAL_DATA. It records no
    executable paths, usernames, or command‑line arguments.

Files changed

File Change
src/AppInstallerCommonCore/Telemetry/TraceLogging.{h,cpp} Declare/define the Microsoft-Windows-Store provider + register its enablement callback
src/AppInstallerCommonCore/Public/AppInstallerTelemetry.h Declare LogStoreInstall
src/AppInstallerCommonCore/AppInstallerTelemetry.cpp Implement LogStoreInstall (writes the event; updates the telemetry summary when the WinGet provider is enabled)
src/AppInstallerCLICore/Workflows/InstallFlow.cpp Call LogStoreInstall on successful msstore installs, guarded by Contains(PackageVersion)

🔗 References

Resolves #6317

🔍 Validation

  • CLI, unpackaged Store app (confirmed): winget install XPFFH613W8V6LV --accept-package-agreements (OBS Studio — an unpackaged exe Store app). An ETW capture of the
    Microsoft-Windows-Store provider showed StoreExperienceTelemetry-WinGetInstall with pid =
    the Store product ID and cn = msstore.
  • Negative cases: no event for non‑msstore sources, and none for a failed install (the event
    is only reached on the success path).
  • Privacy: event is suppressed when WinGet telemetry is disabled via settings or the runtime
    toggle.

✅ Checklist

📋 Issue Type

  • Bug fix
  • Feature
  • Task
Microsoft Reviewers: Open in CodeFlow

shmuelie and others added 10 commits July 1, 2026 13:11
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>
@shmuelie shmuelie requested a review from a team as a code owner July 6, 2026 21:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feature: Optional Telemetry Event for Microsoft Store Catalog Installs (msstore Source)

1 participant