Skip to content

Commit 353f755

Browse files
committed
update
1 parent e4274f3 commit 353f755

2 files changed

Lines changed: 40 additions & 39 deletions

File tree

analysis/kusto/00-telemetry-validation.kql

Lines changed: 38 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,15 @@
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(7d)
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(7d)
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+
);
8697
RawEventsVSCodeExt
8798
| where ServerTimestamp > ago(7d)
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(7d)
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(7d)
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+
);
124135
RawEventsVSCodeExt
125136
| where ServerTimestamp > ago(7d)
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(7d)
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(7d)
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+
);
152164
RawEventsVSCodeExt
153165
| where ServerTimestamp > ago(7d)
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(7d)
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
180184
let totalMachines = toscalar(
181185
RawEventsVSCodeExt
182186
| where ServerTimestamp > ago(7d)
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
);

analysis/kusto/dashboard.ipynb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,8 @@
6161
" try:\n",
6262
" df = run_kql(client, query)\n",
6363
" display(df)\n",
64-
" if \"UniqueMachines\" in df.columns:\n",
65-
" print(f\"Total unique machines: {df['UniqueMachines'].sum():,}\")\n",
64+
" if \"TotalUniqueMachines\" in df.columns:\n",
65+
" print(f\"Total unique machines: {df['TotalUniqueMachines'].iloc[0]:,}\")\n",
6666
" except Exception as e:\n",
6767
" print(f\" ⚠️ {e}\")"
6868
]

0 commit comments

Comments
 (0)