1010// Shows unique machines per version for builds >= 1.23.10781012 (all stable + pre-release).
1111// Use this to confirm the latest pre-release build has real users.
1212// =============================================================================
13- RawEventsVSCodeExt
13+ let filtered = RawEventsVSCodeExt
1414| where ServerTimestamp > ago (7 d )
1515| where ExtensionName == "ms-python.vscode-python-envs"
1616| where ExtensionVersion != ""
1717| extend _minor = toint (extract ("^1\\.(\\d+)" , 1 , ExtensionVersion)), _patch = tolong (extract ("^1\\.\\d+\\.(\\d+)" , 1 , ExtensionVersion))
18- | where _minor > 23 or (_minor == 23 and _patch >= 10781012 )
18+ | where _minor > 23 or (_minor == 23 and _patch >= 10781012 );
19+ filtered
1920| summarize UniqueMachines = dcount (VSCodeMachineId) by ExtensionVersion
21+ | extend TotalUniqueMachines = toscalar (filtered | summarize dcount (VSCodeMachineId))
2022| order by UniqueMachines desc ;
2123
2224
@@ -83,6 +85,15 @@ RawEventsVSCodeExt
8385// Expected: managerName in {conda, pyenv, pipenv, poetry}, reason = "tool_not_found"
8486// These should be common — most users don't have all 4 tools.
8587// =============================================================================
88+ let totalMachines = toscalar (
89+ RawEventsVSCodeExt
90+ | where ServerTimestamp > ago (7 d )
91+ | where ExtensionName == "ms-python.vscode-python-envs"
92+ | where ExtensionVersion != ""
93+ | extend _minor = toint (extract ("^1\\.(\\d+)" , 1 , ExtensionVersion)), _patch = tolong (extract ("^1\\.\\d+\\.(\\d+)" , 1 , ExtensionVersion))
94+ | where _minor > 23 or (_minor == 23 and _patch >= 10781012 )
95+ | summarize dcount (VSCodeMachineId)
96+ );
8697RawEventsVSCodeExt
8798| where ServerTimestamp > ago (7 d )
8899| where EventName == "ms-python.vscode-python-envs/manager_registration.skipped"
@@ -91,18 +102,9 @@ RawEventsVSCodeExt
91102| where _minor > 23 or (_minor == 23 and _patch >= 10781012 )
92103| summarize
93104 EventCount = count (),
94- UniqueMachines = dcount (VSCodeMachineId),
95- TotalUniqueMachines = dcount (VSCodeMachineId)
105+ UniqueMachines = dcount (VSCodeMachineId)
96106 by ManagerName = tostring (Properties.managername), Reason = tostring (Properties.reason)
97- | extend TotalUniqueMachines = toscalar (
98- RawEventsVSCodeExt
99- | where ServerTimestamp > ago (7 d )
100- | where EventName == "ms-python.vscode-python-envs/manager_registration.skipped"
101- | extend ExtVersion = tostring (Properties["common.extversion" ])
102- | extend _minor = toint (extract ("^1\\.(\\d+)" , 1 , ExtVersion)), _patch = tolong (extract ("^1\\.\\d+\\.(\\d+)" , 1 , ExtVersion))
103- | where _minor > 23 or (_minor == 23 and _patch >= 10781012 )
104- | summarize dcount (VSCodeMachineId)
105- )
107+ | extend TotalUniqueMachines = totalMachines
106108| extend MachinePct = round (todouble (UniqueMachines) / todouble (TotalUniqueMachines) * 100 , 1 )
107109| order by EventCount desc ;
108110
@@ -121,6 +123,15 @@ RawEventsVSCodeExt
121123// parse_error — tool ran but returned unparseable output (malformed JSON, unexpected format)
122124// unknown — didn't match any known pattern (catch-all for unexpected errors)
123125// =============================================================================
126+ let totalMachines = toscalar (
127+ RawEventsVSCodeExt
128+ | where ServerTimestamp > ago (7 d )
129+ | where ExtensionName == "ms-python.vscode-python-envs"
130+ | where ExtensionVersion != ""
131+ | extend _minor = toint (extract ("^1\\.(\\d+)" , 1 , ExtensionVersion)), _patch = tolong (extract ("^1\\.\\d+\\.(\\d+)" , 1 , ExtensionVersion))
132+ | where _minor > 23 or (_minor == 23 and _patch >= 10781012 )
133+ | summarize dcount (VSCodeMachineId)
134+ );
124135RawEventsVSCodeExt
125136| where ServerTimestamp > ago (7 d )
126137| where EventName == "ms-python.vscode-python-envs/manager_registration.failed"
@@ -131,15 +142,7 @@ RawEventsVSCodeExt
131142 EventCount = count (),
132143 UniqueMachines = dcount (VSCodeMachineId)
133144 by ManagerName = tostring (Properties.managername), ErrorType = tostring (Properties.errortype)
134- | extend TotalUniqueMachines = toscalar (
135- RawEventsVSCodeExt
136- | where ServerTimestamp > ago (7 d )
137- | where EventName == "ms-python.vscode-python-envs/manager_registration.failed"
138- | extend ExtVersion = tostring (Properties["common.extversion" ])
139- | extend _minor = toint (extract ("^1\\.(\\d+)" , 1 , ExtVersion)), _patch = tolong (extract ("^1\\.\\d+\\.(\\d+)" , 1 , ExtVersion))
140- | where _minor > 23 or (_minor == 23 and _patch >= 10781012 )
141- | summarize dcount (VSCodeMachineId)
142- )
145+ | extend TotalUniqueMachines = totalMachines
143146| extend MachinePct = round (todouble (UniqueMachines) / todouble (TotalUniqueMachines) * 100 , 1 )
144147| order by EventCount desc ;
145148
@@ -149,6 +152,15 @@ RawEventsVSCodeExt
149152// Expected: failureStage in {nativeFinder, managerRegistration, envSelection, terminalWatcher, settingsListener}
150153// This should have very few or 0 rows (hangs are rare). 0 is normal.
151154// =============================================================================
155+ let totalMachines = toscalar (
156+ RawEventsVSCodeExt
157+ | where ServerTimestamp > ago (7 d )
158+ | where ExtensionName == "ms-python.vscode-python-envs"
159+ | where ExtensionVersion != ""
160+ | extend _minor = toint (extract ("^1\\.(\\d+)" , 1 , ExtensionVersion)), _patch = tolong (extract ("^1\\.\\d+\\.(\\d+)" , 1 , ExtensionVersion))
161+ | where _minor > 23 or (_minor == 23 and _patch >= 10781012 )
162+ | summarize dcount (VSCodeMachineId)
163+ );
152164RawEventsVSCodeExt
153165| where ServerTimestamp > ago (7 d )
154166| where EventName == "ms-python.vscode-python-envs/setup.hang_detected"
@@ -159,15 +171,7 @@ RawEventsVSCodeExt
159171 EventCount = count (),
160172 UniqueMachines = dcount (VSCodeMachineId)
161173 by FailureStage = tostring (Properties.failurestage)
162- | extend TotalUniqueMachines = toscalar (
163- RawEventsVSCodeExt
164- | where ServerTimestamp > ago (7 d )
165- | where EventName == "ms-python.vscode-python-envs/setup.hang_detected"
166- | extend ExtVersion = tostring (Properties["common.extversion" ])
167- | extend _minor = toint (extract ("^1\\.(\\d+)" , 1 , ExtVersion)), _patch = tolong (extract ("^1\\.\\d+\\.(\\d+)" , 1 , ExtVersion))
168- | where _minor > 23 or (_minor == 23 and _patch >= 10781012 )
169- | summarize dcount (VSCodeMachineId)
170- )
174+ | extend TotalUniqueMachines = totalMachines
171175| extend MachinePct = round (todouble (UniqueMachines) / todouble (TotalUniqueMachines) * 100 , 1 )
172176| order by EventCount desc ;
173177
@@ -180,12 +184,9 @@ RawEventsVSCodeExt
180184let totalMachines = toscalar (
181185 RawEventsVSCodeExt
182186 | where ServerTimestamp > ago (7 d )
183- | where EventName in (
184- "ms-python.vscode-python-envs/manager_registration.skipped" ,
185- "ms-python.vscode-python-envs/environment_manager.registered"
186- )
187- | extend ExtVersion = tostring (Properties["common.extversion" ])
188- | extend _minor = toint (extract ("^1\\.(\\d+)" , 1 , ExtVersion)), _patch = tolong (extract ("^1\\.\\d+\\.(\\d+)" , 1 , ExtVersion))
187+ | where ExtensionName == "ms-python.vscode-python-envs"
188+ | where ExtensionVersion != ""
189+ | extend _minor = toint (extract ("^1\\.(\\d+)" , 1 , ExtensionVersion)), _patch = tolong (extract ("^1\\.\\d+\\.(\\d+)" , 1 , ExtensionVersion))
189190 | where _minor > 23 or (_minor == 23 and _patch >= 10781012 )
190191 | summarize dcount (VSCodeMachineId)
191192);
0 commit comments