microsoft / msix-packaging

MSIX SDK
MIT License
963 stars 163 forks source link

Is it possible to turn off some of the telemetry generated during checking for updates / applying updates? #569

Closed szanto90balazs closed 4 months ago

szanto90balazs commented 1 year ago

Project MSIX SDK

Describe the bug We use the appinstaller and while the app is checking for updates, or downloading updates in the background, certain telemetry is generated and also the requests sent to our CDN contain a special header.

A, ms-cv header added to requests made to our CDN endpoints

When the app's checking for updates, the MS-CV header is added to the requests. Seems like this is a correlation vector, which is useful for diagnosing issues. On the other hand, users might get the impression that we track them and send client identifiers (ms-cv looks like one) to our servers.

Is it possible to turn this behavior off?

GET https://some.host.com/app.appinstaller HTTP/1.1
Connection: Keep-Alive
Accept: */*
Range: bytes=0-1
User-Agent: Microsoft-Delivery-Optimization/10.0
MS-CV: Kh5URs5ho0eLlqL5.2.39.1.1
Content-Length: 0
Host: some.host.com

B, Microsoft.OSG.DU.DeliveryOptClient.DownloadStarted and Microsoft.OSG.DU.DeliveryOptClient.DownloadCompleted diagnostics

It doesn't matter if user chose "optional" or "required" diagnostics in the system settings, these events are sent to Microsoft servers, with a payload like the one below. I understand why this is required for keeping OS services, OS components and OS apps healthy, but I would like to ask if it's possible to opt-out of these diagnostics events.

Microsoft.OSG.DU.DeliveryOptClient.DownloadStarted
{
"ver": "4.0",
"name": "Microsoft.OSG.DU.DeliveryOptClient.DownloadStarted",
"time": "2022-03-04T12:48:08.0149531Z",
"iKey": "o:0a89d516ae714e01ae89c96d185e9ae3",
"ext": {
"utc": {
"eventFlags": 258,
"pgName": "WINCORE",
"flags": 503317093,
"epoch": "406599",
"seq": 99
},
"metadata": {
"f": {
"errorCode": 2,
"jobID": 8,
"sessionID": 8,
"fileSize": 5,
"fileSizeCaller": 5,
"bytesRequested": 5,
"downloadModeSrc": 2,
"downloadModeReason": 2,
"diceRoll": 6
}
},
"mscv": {
"cV": "OAqTBjAAoESkz7ne.1.1"
},
"os": {
"bootId": 5,
"name": "Windows",
"ver": "10.0.19043.1526.amd64fre.vb_release.191206-1406"
},
"app": {
"id": "W:0000f519feec486de87ed73cb92d3cac802400000000!0000010db07461e45b41c886192df6fd425ba8d42d82!svchost.exe",
"ver": "1972/12/14:16:22:50!1C364!svchost.exe",
"asId": 324
},
"device": {
"localId": "s:66B8EBA1-05D7-4BCE-BECC-3CFDCE08B8A6",
"deviceClass": "Windows.Desktop"
},
"protocol": {
"devMake": "Parallels Software International Inc.",
"devModel": "Parallels Virtual Platform"
},
"user": {
"localId": "w:39DFB6B9-005B-F19F-FF6F-1EB6F39253EC"
},
"loc": {
"tz": "+01:00"
}
},
"data": {
"experimentId": 0,
"errorCode": 0,
"peerID": "8e9eb881351d494fb6568e078f8014af00000000",
"doClientVersion": "10.0.19041.1266",
"jobID": "A3A309AD-05F5-4A83-84E2-1F3065272625",
"sessionID": "30806CED-57E1-48C7-99B6-70ECABBBE843",
"predefinedCallerName": "MSIX HttpsDataSource Download",
"updateID": "",
"costFlags": 0,
"fileID": "db0a4929a419133e395aac3f66bd53d625b214f9",
"fileSize": 162581221,
"fileSizeCaller": 0,
"bytesRequested": 1,
"cdnUrl": "https:/some.cdn/app.msixbundle",
"routeToCacheServer": "",
"filePath": "",
"groupID": "",
"background": false,
"downloadMode": 99,
"downloadModeSrc": 99,
"downloadModeReason": -2133835749,
"diceRoll": 0.39675690899999999,
"deviceProfile": 1179392,
"isVpn": 0,
"isEncrypted": 0,
"setConfigs": "",
"isThrottled": 0
}
}

To Reproduce

Expected behavior The ability to opt-out of the diagnostics and special headers using MSIX / Appintsaller / PackageManager APIs.

The only workaround we have so far is to download the updates manually (from our code) and use PackageManager.AddPackageByUriAsync + file:///C:/..../updates/update.msixbundle. The biggest downside is that we would lose the incremental updates ability.

Platform Windows 10 / 11

anarvekar-msft commented 1 year ago

Hi thank you for your question. That is currently not supported today