Skip to content

Telemetry cleanup and health monitoring for 1.1.0 - #1064

Merged
Tomasz Naumowicz (tnaum-ms) merged 16 commits into
mainfrom
dev/tnaum/survey-telemetry-hidden
Nov 16, 2026
Merged

Tomasz Naumowicz (tnaum-ms) merged 16 commits into
mainfrom
dev/tnaum/survey-telemetry-hidden

Conversation

@tnaum-ms

@tnaum-ms Tomasz Naumowicz (tnaum-ms) commented Nov 4, 2026 •

Copy link
Copy Markdown
Collaborator

Draft. Collects the telemetry changes for 1.1.0 found while rebuilding the telemetry dashboards. Final checks and the AI pre-review are still to come.

What this PR is

Two kinds of change, both aimed at telemetry we can trust:

  1. Cleanup: remove telemetry that is noise or misleading, and fix events whose recorded result was wrong.
  2. Health monitoring: add the few signals needed to see whether connections, views and features actually work for people, and why they fail.

Why

While rebuilding the dashboards, most questions about extension health could not be answered, or were answered wrongly:

  • One internal gauge was 65% of all events and hid real outliers.
  • Failed connections were reported as successes in two tree views.
  • The cause of a failed connection was masked entirely.
  • Light users never appeared in batched counters.

The dashboard analysis and lessons are in docs/ai-and-plans/dashboards/ on the dashboards branch.

Cleanup

  • Removed documentDB.webview.rpcConcurrency. It was an accumulated gauge added in refactor: redesign webview package as @microsoft/vscode-ext-webview #766 to decide whether the webview transport's per-call message listener needed redesigning (R766-S04).
    • Its answer is in: per-machine peak concurrency was p50 2, p95 3, p99 5, with no machine averaging 8 or more, below the revisit thresholds. So the design stays.
    • Its volume was mostly polling: it was 65% of all non-activation events, mostly driven by the Cluster Dashboard health poll.
    • Recorded: the measurement and decision are kept as a comment in connectTrpc.ts and in the feature docs. The claim that it measured per-call latency was wrong and is corrected.
  • Connect outcomes: every tree view's connect event now sets connectionResult. Before, the Connections View and the Azure Resources View reported failed connections as Succeeded.
  • Index commands in the tree (drop, hide, unhide) record a declined confirmation instead of Succeeded, and no longer send the index name.
  • Local Quick Start:
    • customPort is replaced by portChanged (customPort was always true).
    • dockerFailureKind was always none and is fixed.
  • Telemetry batching: accumulateTelemetry now starts with a batch of one and doubles up to 32 (1, 2, 4, 8, 16, 32), throttled every 30 s only at the cap. It used to wait for 20 uses, and the flush on exit rarely arrives, so light users (completions, silent catches) were invisible.

Health monitoring

  • Connection health:
    • connect.startup failures record startupFailureType and startupFailureCategory. The error itself is masked, so until now only the stage was known.
    • Every startup records startupTrigger: tree, Collection View, Cluster Dashboard, dashboard poll, and so on. This tells us which caller starts failing connections in a loop.
  • Request joins: a connect request carries the attempt's connectionCorrelationId, failed attempts included, so view, provider and journey join connect.startup. Retry and Update Credentials record failedStartupCorrelationId, and nodes of a discovered cluster carry its journeyCorrelationId. Docs: docs/ai-and-plans/telemetry-correlation-ids.md.
  • Webview failures: failed webview requests record causeType, the real error type behind tRPC's INTERNAL_SERVER_ERROR.
  • View load times: documentDB.webview.viewLoaded is sent once per new Collection View, Document View and Cluster Dashboard panel.
    • It records viewKind and loadOutcome (data shown, empty, failed, closed before data, timeout).
    • Timings run from panel creation: timeToWebviewReadyMs, timeToFirstDataMs and timeToOutcomeMs, plus firstDataRpcMs.
  • Cluster Dashboard:
    • how long a dashboard stayed open and on screen (clusterDashboard.closed);
    • connections that skip automatic opening because the setting is off (clusterDashboard.autoOpenSkipped);
    • filter use as counts only (inventoryFilter, indexFilter, isFiltered on opening a collection).
  • Local Quick Start:
    • which install or troubleshooting guide is opened (localQuickStart.openGuide);
    • per setup run: readiness at start, failed stage, a fixed failure code, and whether the image was downloaded;
    • localQuickStartInstance on the connect events.
  • Completions: a new completion.offered event (Playground, Collection View, shell) as the denominator for accepted completions.
  • Survey: survey.invitationHidden records invitations hidden without a choice, which used to end with no outcome.

No names, ports, credentials, URLs, query or filter text, document contents or Docker output are sent. New property names avoid "error" and "exception", which azext masks.

Not in this PR

  • Changelog entries: these are internal telemetry changes, so CHANGELOG.md and the release notes are left as on main (commit b81ff28c9).

  • Cluster Dashboard health poll: the 5-second poll keeps running for days, never stops after failures, and is the likely cause of a connection-startup failure loop. It is tracked in Cluster Dashboard health check: pause when hidden, back off and stop after failures #1091 (1.2.0) together with the health check rework.

Validation

  • Case 1 and Case 2 checks ran on 2026-11-16 (7ebd7b049 plus fixes): l10n, prettier-fix, lint, the full Vitest suite (9,531 passed, 1 skipped), build, package, and the browser scenarios (47). All green.
  • After removing the gauge (da13a7f56): build, the targeted tests (704), lint and Prettier pass.
  • origin/main was merged twice on 2026-11-16. The second merge (2273cc1db) brought the 1.1.0 release preparation (Prepare the 1.1.0 release notes and documentation #1090). Its only conflict was CHANGELOG.md. After the merge, build, 2,797 targeted tests, lint and Prettier pass.

Still to do

  • Request GDPR classification for the new events and properties. They do not appear in the warehouse until then.
  • AI pre-review (CONTRIBUTING.md §6), then the full Case 2 run before ready for review.

Links

Add survey.invitationHidden, sent once per automatic invitation the first
time a shown invitation stops being visible while still live (sidebar
hidden or another view shown). It is not an outcome and changes no state.
Only invitationSessionId plus the common campaign/policy properties.

Co-authored-by: Copilot <[email protected]>
…lemetry

- localQuickStart.openGuide mutation opens Docker guides by key on the host
  and records guide, wizardStep, quickStartSessionId and dockerFailureKind.
- documentDB.quickstart.provision: add dockerReadinessAtStart, failedStage,
  failureCode, imagePulled and portChanged; drop customPort (always true).
  dockerFailureKind now also reports a failed checking stage.
- documentDB.quickstart.provision.stage: failureCode on a failed stage.
- connect.startup/staticmetadata/getmetadata: localQuickStartInstance,
  from a mark Quick Start sets in the cached credentials.
- Docs: design.md §14, decision 0008, CHANGELOG 1.1.0.

Co-authored-by: Copilot <[email protected]>
@github-actions

github-actions Bot commented Nov 4, 2026 •

Copy link
Copy Markdown
Contributor

✅ CI passed: standard tier (ready PR)

Commit b81ff28, workflow run.

Layer Result Ran or skipped because
Static checks ✅ passed every push
Unit tests ✅ passed every push
npm packages: verify tarballs ✅ passed packages/**, package-lock.json or the CI workflow changed
VSIX: inspect contents ✅ passed ready PR
VSIX: self-test of the checks ✅ passed build/verification/**, build/vite/**, the Vite configs, package-lock.json or the CI workflow changed
VSIX: activate in VS Code ✅ passed ready PR
VSIX: self-test of the activation check ✅ passed build/verification/**, build/vite/**, the Vite configs, package-lock.json or the CI workflow changed
Webview host in unbundled extensions ✅ passed packages/vscode-ext-webview/**, package-lock.json or the CI workflow changed
E2E ⏭️ not available yet arrives with the E2E iteration (full tier)

Full run: add the ci:full-requested label to run every layer once on the current commit.
No full run yet.

Code quality

Check Status How to fix
Localization (l10n) ✅ Passed Nothing to fix
ESLint ✅ Passed Nothing to fix
Prettier formatting ✅ Passed Nothing to fix

Build size

No page, activation, VSIX or other bundle size changed by 5% or 50 KiB or more against main. VSIX: 9.0 MiB.

Artifacts: VSIX | Bundle-reports-43895740312 | L1-manifest-report-43895740312

All graphs (exact bytes)
Graph PR bytes Base bytes Delta bytes Delta %
Collection View page (collectionView) 6,039,541 6,037,196 ⬆️ +2,345 +0.0%
Document View page (documentView) 4,810,445 4,809,693 ⬆️ +752 +0.0%
Local Quick Start page (localQuickStart) 1,579,746 1,580,447 ⬇️ -701 -0.0%
Atlas Credentials page (atlasCredentials) 1,510,179 1,510,179 ✅ 0 0.0%
Cluster Dashboard page (clusterDashboard) 1,553,664 1,551,887 ⬆️ +1,777 +0.1%
Diagnose Connection page (connectionDiagnostics) 1,533,091 1,533,091 ✅ 0 0.0%
Activation (mainStartup) 3,788,357 3,773,509 ⬆️ +14,848 +0.4%
Extension host (main) 10,463,651 10,448,803 ⬆️ +14,848 +0.1%
Playground worker (playgroundWorker) 5,410,436 5,410,436 ✅ 0 0.0%
VSIX (vsix) 9,423,003 9,417,964 ⬆️ +5,039 +0.1%
playgroundTsPlugin 6,175 6,175 ✅ 0 0.0%
viewsEntry 1,457,617 1,457,617 ✅ 0 0.0%
viewsAssets 80,340 80,340 ✅ 0 0.0%
editorWorker 259,570 259,570 ✅ 0 0.0%
jsonWorker 389,427 389,427 ✅ 0 0.0%

Packaged bytes. Shared chunks count in every graph that loads them, so rows do not add up.

Updated in place on every run.

…lter use

Auto-opened Cluster Dashboards are used in 11.8% of cases against 64% when
opened deliberately, but nothing tells a panel closed at once from one left
behind another editor, and turning automatic opening off in Settings leaves
no trace. The inventory and Indexes tab filters had no signal at all.

- clusterDashboard.closed: openMs, visibleMs, shownAgainCount per session
- clusterDashboard.autoOpenSkipped when the setting suppresses the open
- inventoryFilter / indexFilter: one event per filter use, counts only,
  never the text; openCollectionView records isFiltered
- tree drop/hide/unhide index: record actionType, userCancelled, size and
  usage like the Indexes tab, and stop sending the index name

Decision 0024 in the cluster-dashboard feature docs.

Co-authored-by: Copilot <[email protected]>
Completion acceptance was accumulated in batches of 20 and the flush on
deactivation rarely arrives (4 of ~190 batches in 28 days), so only heavy
bursts reached the warehouse: 2 Playground machines and no shell Tab
completions. The share of people who use completions was unanswerable.

- accumulateTelemetry gains flushNewKeysImmediately: the first time a
  measurement key appears in a session it is flushed at once; repeats
  stay batched
- every completion accumulator uses it (COMPLETION_TELEMETRY_OPTIONS)
- new completion.offered event (src_playground, src_collectionView,
  src_shell) as the denominator of accepted completions

Co-authored-by: Copilot <[email protected]>
A fixed batch of 20 loses everyone who never fills one, because the flush
on deactivation rarely arrives: completion and silent-catch counts only
ever showed heavy users. Instead of a completion-only first-use flush,
every accumulator now starts at a batch of one and doubles after each
flush (1, 2, 4, 8, 16, then 32). The 30 s throttle applies only at the
cap, so early small batches are not held back. A fixed batchSize turns
growth off.

Replaces flushNewKeysImmediately and COMPLETION_TELEMETRY_OPTIONS from
the previous commit; completion call sites are back to the plain call.

Co-authored-by: Copilot <[email protected]>
@tnaum-ms Tomasz Naumowicz (tnaum-ms) changed the title Telemetry: survey invitation hidden and Local Quick Start setup signals Telemetry: adding missing telemetry signals Nov 5, 2026
@tnaum-ms Tomasz Naumowicz (tnaum-ms) added this to the 1.1.0 milestone Nov 5, 2026
Conflicts resolved by keeping main's behavior and reapplying this branch's telemetry on top:

- Local Quick Start moved to per-engine operations (Podman, image pinning). The provision
  outcome telemetry now follows main's stages; `imagePulled` is read from the pull's progress
  lines (`classifyImagePullLine`) and is `false` when setup keeps the local image.
  `dockerReadinessAtStart` reads the readiness of the engine the run uses.
- connect.startup keeps both `localQuickStartInstance` and main's
  `previousFailedStartupCorrelationId`.
- clusterDashboard.autoOpenSkipped is not sent when a deep link opens the dashboard itself.
- Docker guide keys gain main's `podmanMachine` guide.
- Local Quick Start decision 0008 (telemetry) renumbered to 0013; main added 0008-0012.

Co-authored-by: Copilot <[email protected]>
…ttempts

The tree `connect` event is the only event that knows where a connect request came from (view,
discovery provider, journey), but it could not be joined to the attempt: the Connections View and
the Azure Resources View reported a failed connection as Succeeded, and every view set the
attempt's connectionCorrelationId only after a success. Dashboards had to infer outcomes from
which fields happened to be present, and the Azure Resources View could not tell a failure from a
closed prompt.

- ClusterItemBase.reportConnectionAttempt sets connectionResult and the attempt's
  connectionCorrelationId (from the onStartup callback, so failed attempts too) in every tree
  view's connect wrapper once an attempt ran.
- Failures after a cluster was connected (treeExpansion) carry the connection they happened on.
- Retry and Update Credentials record failedStartupCorrelationId; the next connect.startup names
  the same attempt in previousFailedStartupCorrelationId, so whether recovery worked is a join.
- Database, collection, documents and index nodes inherit journeyCorrelationId, so commands on a
  discovered cluster's collections join its discovery journey.

Only random IDs and fixed values are added.

Co-authored-by: Copilot <[email protected]>
…tarted it

connect.startup sets maskEntireErrorMessage, and azext then replaces every
property named like error/exception (including the error type) with
redacted:action. Over 28 days 8,664 failed startups (56% of all extension
failures, 727 users) kept no usable cause, only lastStage and authMethod.

Failed startups now carry, computed from the original error object:
- startupFailureType: parseError's type, kept only when it looks like an
  identifier or a code of up to six digits, else `other`.
- startupFailureCategory: credentialsUnavailable, entraToken,
  authentication, authorization, invalidConnectionString, unsupported, tls,
  dns, timeout, network, serverSelection or other. Classified from error
  classes and codes along the cause chain and the per-server errors of a
  server selection failure; disagreeing servers stay serverSelection and
  anything unrecognized stays other.
Neither name contains error/exception, so whole-error masking keeps them.

20 machines also loop on connect.startup failing at
stage01PreparingCredentials with no authMethod (4,644 failures, about one
every 5 s), and nothing identified the caller. Every startup now records
startupTrigger (treeConnect, treeChildren, collectionView, documentView,
clusterDashboard, clusterDashboardPoll, playgroundCompletion, other) via a
new optional getClient argument passed at the suspect call sites; the
Cluster Dashboard's 5 s measureRtt poll, whose RPC telemetry is suppressed,
is tagged clusterDashboardPoll. No connection behavior changes.

Co-authored-by: Copilot <[email protected]>
documentDB.rpc.* failures record error = parseError(error).errorType, which
is the tRPC code (usually INTERNAL_SERVER_ERROR), and errorCause = the
cause's message. The real failure's type (driver class or server code such
as 18, 13 or 11000) was lost for 1,841 failures from 336 users in 28 days.
Error-named properties also go through aggressive masking, which turns 4+
digit server codes into redacted:id.

Failed RPCs now record causeType: the allow-listed type of the innermost
cause more specific than a plain Error (identifier or up to six digits,
else `other`), omitted when the failure has no cause. Existing properties
are unchanged.

Co-authored-by: Copilot <[email protected]>
Bring the 1.1.0 telemetry branch up to date with main (dependency security
updates, unified tree recovery actions, Windows contributor docs) so the
view-load telemetry builds on the current webview and tree code and the PR
stays mergeable. Merged cleanly; npm ci and npm run l10n produced no changes.

Co-authored-by: Copilot <[email protected]>
Per-RPC events and the documentDB.webview.rpcConcurrency gauge time single
requests, so they cannot say how long someone waits from opening a view to
seeing data: bundle load, React mount and the request chain are invisible.
The Collection View, Document View and Cluster Dashboard are the
highest-reach webviews (835, 351 and 1,107 machines opening them in 28 days).

Each new panel of those three views now emits one
documentDB.webview.viewLoaded event, from the host through
callWithTelemetryAndErrorHandling:
- loadOutcome: dataShown, empty, failed, closedBeforeData or timeout (120 s).
- timeToWebviewReadyMs (render cost) and timeToFirstDataMs (data cost), both
  from panel creation on the host (timingStart = panelCreated), plus
  timeToOutcomeMs for every outcome and the webview-timed firstDataRpcMs.
- viewKind, webviewReady and existing correlation: dashboardSessionId,
  collectionSessionId, journeyCorrelationId, viewId, plus initialTab and
  documentMode.

openAppWebview creates a ViewLoadTracker when a factory passes viewLoad and
shares it through the router context. The webview sends webviewReady and
firstData milestones through a new common.reportViewLoad procedure (a plain
publicProcedure so no per-call RPC event duplicates it). The tracker reports
once, ignores later milestones (refreshes, polls, remounts) and clears its
timer when it settles. Reveals of an open dashboard and new documents
(mode add) send nothing. No names, query text or document contents are sent;
no property name contains error or exception.

Co-authored-by: Copilot <[email protected]>
Adjust test expectations for the new treeConnect telemetry argument and make parseError mock stringify only primitive error codes so lint and full verification pass.

Co-authored-by: Copilot <[email protected]>
The Case 2 check run formatted these files but left the result uncommitted;
the diff is Prettier output only (verified file by file against HEAD).

Co-authored-by: Copilot <[email protected]>
…R766-S04)

The gauge was added in #766 (dbbf996) to decide whether the webview
transport's per-call `message` listener (O(N) per message) needed a
multiplexer. It has answered that: 19 Oct-15 Nov 2026, per-machine peak
concurrency p50 2 / p95 3 / p99 5, 4 of 1,149 machines above 8, max 52,
none averaging 8 or more, well below the revisit thresholds. Meanwhile it
was 65% of all non-activation events (1.16M rows), almost all paced by the
Cluster Dashboard's 5 s health poll, which skewed every volume metric.

- Remove rpcConcurrencyLogger, its test and the event name. openAppWebview
  keeps the dev-only console dispatch logger and passes an inert logger in
  production (the package default would otherwise log every RPC).
- Keep ProcedureLogEntry.concurrent in @microsoft/vscode-ext-webview: it is
  published API and free without a consumer.
- Record the measurement, conclusion and revisit trigger on onReceive in
  connectTrpc.ts, and a dated S04 resolution in the webview-ext-package docs.
- Correct the claim that dist_auto_duration_ms is per-op latency: it times
  the accumulateTelemetry populator, not the operation.
- CHANGELOG 1.1.0: note the removal.

Co-authored-by: Copilot <[email protected]>
@tnaum-ms Tomasz Naumowicz (tnaum-ms) changed the title Telemetry: adding missing telemetry signals Telemetry cleanup and health monitoring for 1.1.0 Nov 16, 2026
Brings in the 1.1.0 release preparation from main (#1090): version bump
to 1.1.0, release notes, changelog and user-manual updates, images.

Conflicts:
- CHANGELOG.md (1.1.0 section): main added the 1.1.0 New Features,
  Improvements, Fixes and Security entries; this branch had started a
  1.1.0 section with telemetry Improvements only. Kept main's structure
  and entries and appended this branch's telemetry entries after main's
  Improvements.

Also in CHANGELOG.md: moved the "Feedback Survey Telemetry" entry from
1.0.2 to 1.1.0. Its commit (296f964) is not in v1.0.2, so it ships
in 1.1.0.

No code changes came from main, and no semantic conflicts were found.
package.json and package-lock.json merged cleanly (version only).

Co-authored-by: Copilot <[email protected]>
The changelog and release notes describe what users see. The telemetry
additions and the removed concurrency gauge are internal and are described
in the PR and the feature docs instead, so CHANGELOG.md matches main again.

Co-authored-by: Copilot <[email protected]>
@tnaum-ms
Tomasz Naumowicz (tnaum-ms) marked this pull request as ready for review November 16, 2026 15:23
@tnaum-ms
Tomasz Naumowicz (tnaum-ms) merged commit 89f9a9d into main Nov 16, 2026
24 checks passed
@tnaum-ms
Tomasz Naumowicz (tnaum-ms) deleted the dev/tnaum/survey-telemetry-hidden branch November 16, 2026 16:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Development

Successfully merging this pull request may close these issues.

2 participants