Skip to content

Commit 3865931

Browse files
authored
Update RFCNNNN-AdditionalTelemetry.md
1 parent d12d760 commit 3865931

File tree

1 file changed

+27
-17
lines changed

1 file changed

+27
-17
lines changed

1-Draft/RFCNNNN-AdditionalTelemetry.md

Lines changed: 27 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,14 @@ statistics.
2020
To make the best possible investments in PowerShell we need answers backed by data to the following questions:
2121

2222
- Is PowerShell Core usage growing (in terms of number of starts)?
23-
- Is the PowerShell Core user-base growing (both in terms of number of users and devices)?
23+
- Is the PowerShell Core user-base growing?
2424
- How is PowerShell being used? What is the usage distribution across command types and session type?
2525
- What are impediments to PowerShell Core usage growth?
2626
- What are issues that customers are hitting in PowerShell Core?
2727
- What versions of PowerShell tools and services should Microsoft continue to support?
2828
- What PowerShell integration scenarios are people using? How many people are using PowerShell
29-
Editor services
29+
Editor services?
30+
- Which experimental features are being used and tested? Which experimental features should we invest in?
3031
- How can we optimize the engine size and efficiency of PowerShell for cloud scenarios?
3132

3233
To ensure we are getting an accurate picture of how everyone uses PowerShell, not just those most
@@ -54,6 +55,7 @@ Add telemetry to track the following metrics:
5455
- Count of unique devices (PowerShell)
5556
- Count of unique users (PowerShell)
5657
- Count of execution types (ex. cmdlets, native binaries/applications) (PowerShell)
58+
- Count of enabled PSEngine experimental features (only those created by the PowerShell Team) (PowerShell)
5759
- Count of session types (ex. hosted vs not hosted sessions) (PowerShell)
5860
- Hosting application of the of the PowerShell session (ex. VSCode, ISE, AZDevOps) (PowerShell)
5961
- Version of PowerShell, PowerShellGet, PackageManagement, Nuget and platform
@@ -65,16 +67,15 @@ Add telemetry to track the following metrics:
6567
Find a mocked-up PowerBi DashBoard with randomly generated data at the end of the document.
6668
It includes the following reports:
6769
- Unique user trends
68-
- Unique devices trends
6970
- Types of user —based on types of executions taking place
7071
- VSCode usage trends
7172
- Application trends
7273
- Hosted Scenario Trends
7374
- PowerShellGet installation trends
7475
- A cmdlet for providing feedback (Send-PSFeedback):
75-
- This cmdlet would take in a string and send it back to the PowerShell team
76+
- This cmdlet would take in a string array and send it back to the PowerShell team
7677
- The cmdlet will also send Platform data (OS/version) and Shell data ($PSVersionTable)
77-
- The cmdlet will have an -OpenGitHubIssue switch that will allow the user to open a GitHubIssue
78+
- The cmdlet will have an -OpenGitHubIssue switch that will open a browser to a new issue template
7879
in the PowerShell/PowerShell repository
7980
- The user will have the option to include the the last error using an -IncludeError switch
8081
- If the command is not successful (ex. there is no Web Connection) the cmdlet will return a
@@ -86,50 +87,52 @@ Add telemetry to track the following metrics:
8687
- The cmdlet will stop all collection of telemetry for the remainder of that session and stop
8788
telemetry from being collected on subsequent starts
8889
- The user can request their telemetry is deleted by using a Remove-PSTelemetry cmdlet
89-
- In order to have their telemetry deleted the user will be required to provide their System GUID
90-
and User GUID
90+
- In order to have their telemetry deleted the user will be required to provide their User GUID
9191
- If the cmdlet is unable to send the information the cmdlet will return a warning and alternative
9292
instructions for support through GitHub. It will be specified that GUIDs are unique identifiers
9393
and should not be shared publicly on GitHub.
94-
- There will be three options for the telemetry environment variable which can all be set manually
94+
- There will be two options for the telemetry environment variable which can be set manually
9595
or using the Set-PSTelemetry cmdlet
9696
- $True indicates all telemetry will be collected
9797
- $False indicates no telemetry will be collected
98-
- $NonIdentifying indicates that only non-identifying telemetry will be collected i.e. no GUIDs
99-
will be collected
10098
- The existing disabling mechanisms for PowerShell telemetry will remain including the ability to
101-
set the telemetry environment variable before the first start of PowerShell
99+
set the telemetry environment variable before ever needing to launch PowerShell.
100+
Setting the telemetry environment variable to $False will block telemetry from being sent on
101+
every session launch.
102102

103103
### Future work
104104

105105
A public API for module authors and PowerShell hosted application owners to use the same
106106
infrastructure to collect telemetry for their module or application.
107107
Making the API public is a phase two goal of this project.
108108
We will make the telemetry publicly available once it is internally validated.
109-
Microsoft will not collect, store, or manage any data externally gathered through this API.
109+
The intent of this API is to provide a simple consistent way for PowerShell authors to collect their own telemetry.
110+
If external PowerShell authors want to use the API they will need to provide their own storage for the data.
111+
Validating compliance/privacy will be up to the user of the API and not something PowerShell team/Microsoft will cover.
110112

111113
## Design
112114

113115
### PowerShell Changes
114116

115-
- Count of unique devices will be based on a System GUID generated on the first start-up
116117
- Count of unique users will be based on a User GUID generated at PowerShell start time and stored
117118
in the user's configuration directory
118-
- The combination of the User GUID and System GUID will be used to determine counts of unique
119-
users and unique devices
119+
- On first start up notification that telemetry is enabled will display in the console header
120120
- The Application ID will be used to disambiguate PowerShell Hosted applications. It will be a
121121
standardized method for applications to identify themselves in our telemetry. It will be up to
122122
Application owners to tag their usage for inclusion in our counts.
123123
- The count execution type will be collected throughout the PowerShell session
124124
- The type of PowerShell session (hosted vs non-hosted) will be collected at PowerShell
125125
engine start time
126+
- The count of enabled PSEngine experiemental features will be collected at PowerShell
127+
engine start time. The count will be based on the experimental feature list in the
128+
powershell.config.json file under $PSHOME, and will only count features created by the PowerShell Team
126129
- An example of what would be collected on PowerShell Start up:
127-
- System GUID: b45d67e8-8c51-4ea3-a170-0a3cedb697ed
128130
- User GUID: c58030d3-1a91-4086-9cb1-5bddd342056d
129131
- The ApplicationID: VSCode
130132
- The Platform being used: Windows 10 Pro
131133
- The Version of PowerShell: 6.2.0-preview.4
132134
- The type of PS session: Hosted
135+
- Experimental Features enabled: "A-Experimental-Feature-name", "Another-Experimental-Feature-Name"
133136
- An example of what might be collected during a PowerShell Session:
134137
- Count of cmdlets and functions: 10
135138
- Count of native binaries/applications: 5
@@ -167,9 +170,16 @@ to collect/send the following information:
167170

168171
Privacy concerns including GDPR regulations are a major consideration of this RFC.
169172
We underwent a privacy review before drafting this RFC to ensure that we are respecting
170-
the privacy of all users. The System GUID will be stored in $PSHome so that the user
173+
the privacy of all users. The User GUID will be stored in $PSHome so that the user
171174
can provide it and have their data deleted at anytime.
172175
Performance impact is also a major consideration of these changes, and the metrics chosen are
173176
designed to have as nominal an impact on end user experience as possible.
174177

178+
We considered collecting the module/function/cmdlet usage from only modules that are downloaded by the PowerShell Gallery.
179+
The reason we did not chose to propose this is because of the large cost (in terms of performance, data collection, and data management)
180+
compared with the relatively smaller benefit of actionable questions we could answer with the information.
181+
182+
We also considered automatically collecting a count of fully qualified error ids. The reason we decided against this was because
183+
of the potential performance impact and high cost.
184+
175185
[Microsoft Privacy Policy](https://privacy.microsoft.com/en-US/privacystatement)

0 commit comments

Comments
 (0)