Skip to content

Commit c118ccc

Browse files
committed
update
1 parent cf6fb89 commit c118ccc

11 files changed

+155
-29
lines changed

analysis/kusto/00-telemetry-validation.kql

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77

88
// =============================================================================
9-
// CHECK 0: UniqueMachines with Telemetry Changes
9+
// CHECK 0: UniqueMachines with new telemetry
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
// =============================================================================
@@ -23,9 +23,7 @@ filtered
2323

2424

2525
// =============================================================================
26-
// CHECK 1: Are all 4 events arriving? (3 new + 1 enhanced)
27-
// Expected: at least 1 row per event. If any row shows 0, that event is broken.
28-
// Broken down by extension version so you can confirm the new build is reporting.
26+
// CHECK 1: Are all 4 events arriving? (Only versions with ⚠️ NO DATA YET are displayed)
2927
// =============================================================================
3028
let allEvents = datatable(EventName: string) [
3129
"ms-python.vscode-python-envs/manager_registration.failed",
@@ -53,11 +51,12 @@ allEvents
5351
EventCount = coalesce(EventCount, 0),
5452
UniqueMachines = coalesce(UniqueMachines, 0),
5553
Status = iff(coalesce(EventCount, 0) > 0, "✅ RECEIVING DATA", "⚠️ NO DATA YET")
54+
| where Status == "⚠️ NO DATA YET"
5655
| order by EventName asc, ExtVersion desc;
5756

5857

5958
// =============================================================================
60-
// CHECK 2: Enhanced event — does "result" property exist?
59+
// CHECK 2: MANAGER_REGISTRATION_DURATION event success rate
6160
// The existing event previously had only "duration". Now it should have "result".
6261
// Expected: rows with result = "success" (should be the majority) and maybe a few "error".
6362
// If result is empty/"", the property isn't being sent correctly.
@@ -81,7 +80,7 @@ RawEventsVSCodeExt
8180

8281

8382
// =============================================================================
84-
// CHECK 3: MANAGER_REGISTRATION.SKIPPED — property validation
83+
// CHECK 3: MANAGER_REGISTRATION.SKIPPED (Percentage of users don't have each tool)
8584
// Expected: managerName in {conda, pyenv, pipenv, poetry}, reason = "tool_not_found"
8685
// These should be common — most users don't have all 4 tools.
8786
// =============================================================================
@@ -100,10 +99,12 @@ RawEventsVSCodeExt
10099
| extend ExtVersion = tostring(Properties["common.extversion"])
101100
| extend _minor = toint(extract("^1\\.(\\d+)", 1, ExtVersion)), _patch = tolong(extract("^1\\.\\d+\\.(\\d+)", 1, ExtVersion))
102101
| where _minor > 23 or (_minor == 23 and _patch >= 10781012)
102+
| extend ManagerName = tostring(Properties.managername), Reason = tostring(Properties.reason)
103+
| where isnotempty(ManagerName) and isnotempty(Reason)
103104
| summarize
104105
EventCount = count(),
105106
UniqueMachines = dcount(VSCodeMachineId)
106-
by ManagerName = tostring(Properties.managername), Reason = tostring(Properties.reason)
107+
by ManagerName, Reason
107108
| extend TotalUniqueMachines = totalMachines
108109
| extend MachinePct = round(todouble(UniqueMachines) / todouble(TotalUniqueMachines) * 100, 1)
109110
| order by EventCount desc;
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
// Query 1 — Registration Failure Stage Breakdown per Manager (28 days)
2+
// For each manager that failed, shows WHICH stage in the registration flow broke.
3+
// failureStage is hierarchical: "getPipenv:nativeFinderRefresh", "constructCondaSourcingStatus", etc.
4+
// High counts at a specific stage → that code path is the priority fix target.
5+
let endDate = startofday(now()-1d);
6+
RawEventsVSCodeExt
7+
| where ServerTimestamp > endDate-28d and ServerTimestamp < endDate
8+
| where EventName == "ms-python.vscode-python-envs/manager_registration.failed"
9+
| extend ExtVersion = tostring(Properties["common.extversion"])
10+
| extend _minor = toint(extract("^1\\.(\\d+)", 1, ExtVersion)), _patch = tolong(extract("^1\\.\\d+\\.(\\d+)", 1, ExtVersion))
11+
| where _minor > 23 or (_minor == 23 and _patch >= 10781012)
12+
| extend ManagerName = tostring(Properties.managername)
13+
| extend FailureStage = tostring(Properties.failurestage)
14+
| summarize
15+
FailureCount = count(),
16+
AffectedMachines = dcount(VSCodeMachineId)
17+
by ManagerName, FailureStage
18+
| order by ManagerName asc, AffectedMachines desc
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
// Query 2 — Error Type × Failure Stage Matrix (28 days)
2+
// Cross-tabulates errorType (what kind of error) with failureStage (where it happened).
3+
// This is the key diagnostic view: e.g., "connection_error at nativeFinderRefresh" means
4+
// PET process dies during native finder, while "tool_not_found at pathLookup" means the
5+
// tool binary wasn't on PATH. Prioritize cells with the highest AffectedMachines.
6+
let endDate = startofday(now()-1d);
7+
RawEventsVSCodeExt
8+
| where ServerTimestamp > endDate-28d and ServerTimestamp < endDate
9+
| where EventName == "ms-python.vscode-python-envs/manager_registration.failed"
10+
| extend ExtVersion = tostring(Properties["common.extversion"])
11+
| extend _minor = toint(extract("^1\\.(\\d+)", 1, ExtVersion)), _patch = tolong(extract("^1\\.\\d+\\.(\\d+)", 1, ExtVersion))
12+
| where _minor > 23 or (_minor == 23 and _patch >= 10781012)
13+
| extend ManagerName = tostring(Properties.managername)
14+
| extend ErrorType = tostring(Properties.errortype)
15+
| extend FailureStage = tostring(Properties.failurestage)
16+
| summarize
17+
FailureCount = count(),
18+
AffectedMachines = dcount(VSCodeMachineId)
19+
by ManagerName, ErrorType, FailureStage
20+
| order by AffectedMachines desc, ManagerName asc
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
// Query 3 — Daily Registration Failures by Manager and Stage (14 days)
2+
// Day-by-day failure counts per manager + failureStage combination.
3+
// Use this to detect if a specific stage started failing more after a release.
4+
// A spike in one stage on a specific day → regression in that code path.
5+
let endDate = startofday(now()-1d);
6+
RawEventsVSCodeExt
7+
| where ServerTimestamp > endDate-14d and ServerTimestamp < endDate
8+
| where EventName == "ms-python.vscode-python-envs/manager_registration.failed"
9+
| extend ExtVersion = tostring(Properties["common.extversion"])
10+
| extend _minor = toint(extract("^1\\.(\\d+)", 1, ExtVersion)), _patch = tolong(extract("^1\\.\\d+\\.(\\d+)", 1, ExtVersion))
11+
| where _minor > 23 or (_minor == 23 and _patch >= 10781012)
12+
| extend Day = startofday(ServerTimestamp)
13+
| extend ManagerName = tostring(Properties.managername)
14+
| extend FailureStage = tostring(Properties.failurestage)
15+
| summarize
16+
FailureCount = count(),
17+
AffectedMachines = dcount(VSCodeMachineId)
18+
by Day, ManagerName, FailureStage
19+
| order by Day asc, ManagerName asc, AffectedMachines desc
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)