Skip to content

Commit c5d008a

Browse files
committed
update
1 parent 353f755 commit c5d008a

11 files changed

Lines changed: 73 additions & 201 deletions

analysis/kusto/01-overall-setup-success-rate.kql

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
// Query 1 — Overall Setup Success Rate (Last 28 Days)
22
// Of all machines that started manager setup, what % completed successfully?
33
// This is the top-level health metric. If this drops, something is broken.
4-
let endDate = startofday(now()-1d);
54
RawEventsVSCodeExt
6-
| where ServerTimestamp > endDate-28d and ServerTimestamp < endDate
5+
| where ServerTimestamp > ago(28d)
76
| where EventName == "ms-python.vscode-python-envs/extension.manager_registration_duration"
7+
| extend ExtVersion = tostring(Properties["common.extversion"])
8+
| extend _minor = toint(extract("^1\\.(\\d+)", 1, ExtVersion)), _patch = tolong(extract("^1\\.\\d+\\.(\\d+)", 1, ExtVersion))
9+
| where _minor > 23 or (_minor == 23 and _patch >= 10781012)
810
| summarize
911
TotalMachines = dcount(VSCodeMachineId),
1012
SuccessMachines = dcountif(VSCodeMachineId, tostring(Properties.result) == "success"),

analysis/kusto/02-failure-stage-breakdown.kql

Lines changed: 0 additions & 14 deletions
This file was deleted.

analysis/kusto/04-manager-availability.kql renamed to analysis/kusto/02-manager-availability.kql

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,29 @@
1-
// Query 4 — Manager Availability: What Tools Do Users Have Installed?
1+
// Query 2 — Manager Availability: What Tools Do Users Have Installed?
22
// For each manager, counts: registered (tool found), skipped (tool not found), failed (crashed).
33
// InstalledRate shows what % of users actually have each tool.
44
let endDate = startofday(now()-1d);
55
let skipped = RawEventsVSCodeExt
66
| where ServerTimestamp > endDate-28d and ServerTimestamp < endDate
77
| where EventName == "ms-python.vscode-python-envs/manager_registration.skipped"
8+
| extend ExtVersion = tostring(Properties["common.extversion"])
9+
| extend _minor = toint(extract("^1\\.(\\d+)", 1, ExtVersion)), _patch = tolong(extract("^1\\.\\d+\\.(\\d+)", 1, ExtVersion))
10+
| where _minor > 23 or (_minor == 23 and _patch >= 10781012)
811
| summarize SkippedMachines = dcount(VSCodeMachineId) by ManagerName = tostring(Properties.managername);
912
let registered = RawEventsVSCodeExt
1013
| where ServerTimestamp > endDate-28d and ServerTimestamp < endDate
1114
| where EventName == "ms-python.vscode-python-envs/environment_manager.registered"
12-
| summarize RegisteredMachines = dcount(VSCodeMachineId) by ManagerName = tostring(Properties.managerid);
15+
| extend ExtVersion = tostring(Properties["common.extversion"])
16+
| extend _minor = toint(extract("^1\\.(\\d+)", 1, ExtVersion)), _patch = tolong(extract("^1\\.\\d+\\.(\\d+)", 1, ExtVersion))
17+
| where _minor > 23 or (_minor == 23 and _patch >= 10781012)
18+
| extend RawManagerId = tostring(Properties.managerid)
19+
| extend ManagerName = extract("[^:]+$", 0, RawManagerId)
20+
| summarize RegisteredMachines = dcount(VSCodeMachineId) by ManagerName;
1321
let failed = RawEventsVSCodeExt
1422
| where ServerTimestamp > endDate-28d and ServerTimestamp < endDate
1523
| where EventName == "ms-python.vscode-python-envs/manager_registration.failed"
24+
| extend ExtVersion = tostring(Properties["common.extversion"])
25+
| extend _minor = toint(extract("^1\\.(\\d+)", 1, ExtVersion)), _patch = tolong(extract("^1\\.\\d+\\.(\\d+)", 1, ExtVersion))
26+
| where _minor > 23 or (_minor == 23 and _patch >= 10781012)
1627
| summarize FailedMachines = dcount(VSCodeMachineId) by ManagerName = tostring(Properties.managername);
1728
skipped
1829
| join kind=fullouter registered on ManagerName
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,20 @@
1-
// Query 6 — Daily Trend: Are Failures Increasing or Decreasing?
1+
// Query 3 — Daily Trend: Are Failures Increasing or Decreasing?
22
// Day-by-day trend of setup results. Check this after shipping a new version.
33
// A sudden SuccessRate drop means a regression; a rise means a fix is working.
44
let endDate = startofday(now()-1d);
55
RawEventsVSCodeExt
66
| where ServerTimestamp > endDate-14d and ServerTimestamp < endDate
77
| where EventName == "ms-python.vscode-python-envs/extension.manager_registration_duration"
8+
| extend ExtVersion = tostring(Properties["common.extversion"])
9+
| extend _minor = toint(extract("^1\\.(\\d+)", 1, ExtVersion)), _patch = tolong(extract("^1\\.\\d+\\.(\\d+)", 1, ExtVersion))
10+
| where _minor > 23 or (_minor == 23 and _patch >= 10781012)
811
| extend Day = startofday(ServerTimestamp)
12+
| extend Result = tostring(Properties.result)
13+
| where Result in ("success", "error")
914
| summarize
10-
SuccessCount = countif(tostring(Properties.result) == "success"),
11-
ErrorCount = countif(tostring(Properties.result) == "error"),
12-
TotalCount = count()
15+
SuccessCount = countif(Result == "success"),
16+
ErrorCount = countif(Result == "error")
1317
by Day
18+
| extend TotalCount = SuccessCount + ErrorCount
1419
| extend SuccessRate = round(todouble(SuccessCount) / todouble(TotalCount) * 100, 1)
1520
| order by Day asc

analysis/kusto/03-which-managers-fail-most.kql

Lines changed: 0 additions & 12 deletions
This file was deleted.

analysis/kusto/08-error-type-distribution.kql renamed to analysis/kusto/04-error-type-distribution.kql

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Query 8 — Error Type Distribution Across All Failures
1+
// Query 4 — Error Type Distribution Across All Failures
22
// Combines errors from overall setup and individual managers, grouped by error type.
33
// Action depends on results:
44
// spawn_timeout → native finder or tool is too slow
@@ -10,11 +10,17 @@ let endDate = startofday(now()-1d);
1010
let setupErrors = RawEventsVSCodeExt
1111
| where ServerTimestamp > endDate-28d and ServerTimestamp < endDate
1212
| where EventName == "ms-python.vscode-python-envs/extension.manager_registration_duration"
13+
| extend ExtVersion = tostring(Properties["common.extversion"])
14+
| extend _minor = toint(extract("^1\\.(\\d+)", 1, ExtVersion)), _patch = tolong(extract("^1\\.\\d+\\.(\\d+)", 1, ExtVersion))
15+
| where _minor > 23 or (_minor == 23 and _patch >= 10781012)
1316
| where tostring(Properties.result) == "error"
1417
| project ErrorType = tostring(Properties.errortype), Source = "setup_overall", VSCodeMachineId;
1518
let managerErrors = RawEventsVSCodeExt
1619
| where ServerTimestamp > endDate-28d and ServerTimestamp < endDate
1720
| where EventName == "ms-python.vscode-python-envs/manager_registration.failed"
21+
| extend ExtVersion = tostring(Properties["common.extversion"])
22+
| extend _minor = toint(extract("^1\\.(\\d+)", 1, ExtVersion)), _patch = tolong(extract("^1\\.\\d+\\.(\\d+)", 1, ExtVersion))
23+
| where _minor > 23 or (_minor == 23 and _patch >= 10781012)
1824
| project ErrorType = tostring(Properties.errortype), Source = "individual_manager", VSCodeMachineId;
1925
union setupErrors, managerErrors
2026
| summarize

analysis/kusto/09-hang-failure-correlation.kql renamed to analysis/kusto/05-hang-failure-correlation.kql

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,20 @@
1-
// Query 9 — Hang + Failure Correlation
1+
// Query 5 — Hang + Failure Correlation
22
// Do hangs always result in failures, or do some self-recover?
33
// If most hangs recover → just slow machines. If most also fail → real deadlock or crash.
44
let endDate = startofday(now()-1d);
55
let hangMachines = RawEventsVSCodeExt
66
| where ServerTimestamp > endDate-28d and ServerTimestamp < endDate
77
| where EventName == "ms-python.vscode-python-envs/setup.hang_detected"
8+
| extend ExtVersion = tostring(Properties["common.extversion"])
9+
| extend _minor = toint(extract("^1\\.(\\d+)", 1, ExtVersion)), _patch = tolong(extract("^1\\.\\d+\\.(\\d+)", 1, ExtVersion))
10+
| where _minor > 23 or (_minor == 23 and _patch >= 10781012)
811
| distinct VSCodeMachineId;
912
let failedMachines = RawEventsVSCodeExt
1013
| where ServerTimestamp > endDate-28d and ServerTimestamp < endDate
1114
| where EventName == "ms-python.vscode-python-envs/extension.manager_registration_duration"
15+
| extend ExtVersion = tostring(Properties["common.extversion"])
16+
| extend _minor = toint(extract("^1\\.(\\d+)", 1, ExtVersion)), _patch = tolong(extract("^1\\.\\d+\\.(\\d+)", 1, ExtVersion))
17+
| where _minor > 23 or (_minor == 23 and _patch >= 10781012)
1218
| where tostring(Properties.result) == "error"
1319
| distinct VSCodeMachineId;
1420
let totalHangs = toscalar(hangMachines | count);

analysis/kusto/05-setup-hang-detection.kql

Lines changed: 0 additions & 13 deletions
This file was deleted.

analysis/kusto/10-weekly-health-summary.kql renamed to analysis/kusto/06-weekly-health-summary.kql

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Query 10 — Weekly Report: Full Health Summary
1+
// Query 6 — Weekly Report: Full Health Summary
22
// One-stop query for weekly health check. Run every Monday.
33
// Returns one row with all key numbers: activations, setup results, manager failures, hangs.
44
let endDate = startofday(now()-1d);
@@ -7,22 +7,35 @@ let totalActivations = toscalar(
77
RawEventsVSCodeExt
88
| where ServerTimestamp > startDate and ServerTimestamp < endDate
99
| where EventName == "ms-python.vscode-python-envs/extension.activation_duration"
10+
| where ExtensionVersion != ""
11+
| extend _minor = toint(extract("^1\\.(\\d+)", 1, ExtensionVersion)), _patch = tolong(extract("^1\\.\\d+\\.(\\d+)", 1, ExtensionVersion))
12+
| where _minor > 23 or (_minor == 23 and _patch >= 10781012)
1013
| summarize dcount(VSCodeMachineId)
1114
);
1215
let setupResults = RawEventsVSCodeExt
1316
| where ServerTimestamp > startDate and ServerTimestamp < endDate
1417
| where EventName == "ms-python.vscode-python-envs/extension.manager_registration_duration"
18+
| where ExtensionVersion != ""
19+
| extend _minor = toint(extract("^1\\.(\\d+)", 1, ExtensionVersion)), _patch = tolong(extract("^1\\.\\d+\\.(\\d+)", 1, ExtensionVersion))
20+
| where _minor > 23 or (_minor == 23 and _patch >= 10781012)
21+
| where isnotempty(tostring(Properties.result))
1522
| summarize
1623
SetupSuccess = dcountif(VSCodeMachineId, tostring(Properties.result) == "success"),
1724
SetupError = dcountif(VSCodeMachineId, tostring(Properties.result) == "error"),
1825
MedianDurationMs = percentile(todouble(Properties.duration), 50);
1926
let managerFailures = RawEventsVSCodeExt
2027
| where ServerTimestamp > startDate and ServerTimestamp < endDate
2128
| where EventName == "ms-python.vscode-python-envs/manager_registration.failed"
29+
| where ExtensionVersion != ""
30+
| extend _minor = toint(extract("^1\\.(\\d+)", 1, ExtensionVersion)), _patch = tolong(extract("^1\\.\\d+\\.(\\d+)", 1, ExtensionVersion))
31+
| where _minor > 23 or (_minor == 23 and _patch >= 10781012)
2232
| summarize ManagerFailures = count(), ManagerFailMachines = dcount(VSCodeMachineId);
2333
let hangs = RawEventsVSCodeExt
2434
| where ServerTimestamp > startDate and ServerTimestamp < endDate
2535
| where EventName == "ms-python.vscode-python-envs/setup.hang_detected"
36+
| where ExtensionVersion != ""
37+
| extend _minor = toint(extract("^1\\.(\\d+)", 1, ExtensionVersion)), _patch = tolong(extract("^1\\.\\d+\\.(\\d+)", 1, ExtensionVersion))
38+
| where _minor > 23 or (_minor == 23 and _patch >= 10781012)
2639
| summarize Hangs = count(), HangMachines = dcount(VSCodeMachineId);
2740
setupResults | extend _k = 1
2841
| join (managerFailures | extend _k = 1) on _k

analysis/kusto/07-setup-duration-percentiles.kql

Lines changed: 0 additions & 16 deletions
This file was deleted.

0 commit comments

Comments
 (0)