Add Copilot setup dialog impression telemetry - #336346
Merged
Joaquín Ruales (jruales) merged 3 commits intoSep 16, 2026
Merged
Conversation
Record displayed dialogs with allowlisted caller and account-state context without changing authentication behavior. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 8310b3e7-c24b-486a-802e-ef8efb5b3c0d
Copilot started reviewing on behalf of
Joaquín Ruales (jruales)
September 15, 2026 23:53
View session
Contributor
There was a problem hiding this comment.
Copilot review overview
🟢 Approval recommended
The centralized emission, privacy allowlisting, and focused tests consistently implement the stated telemetry behavior.
Review tier: Balanced
Findings: None
What changed in this PR
Adds telemetry for displayed Copilot setup/sign-in dialogs without changing authentication or dialog behavior.
Changes:
- Emits an allowlisted
chatSetup.dialogShownevent from the shared presentation path. - Attributes major setup entry points and distinguishes workbench versus Agents surfaces.
- Adds coverage for payloads, cancellation, concurrency, redisplay, and source propagation.
| File | Description |
|---|---|
src/vs/workbench/contrib/scm/browser/scmInput.ts |
Attributes SCM input setup dialogs. |
src/vs/workbench/contrib/scm/browser/scm.contribution.ts |
Attributes SCM action setup dialogs. |
src/vs/workbench/contrib/chat/test/browser/chatSetup/chatSetup.test.ts |
Tests telemetry payload and emission behavior. |
src/vs/workbench/contrib/chat/test/browser/agentSessions/agentHostChatContribution.test.ts |
Updates Agent Host command expectations. |
src/vs/workbench/contrib/chat/test/browser/agentSessions/agentHostAuth.test.ts |
Verifies Agent Host source attribution. |
src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupRunner.ts |
Defines and emits dialog impression telemetry. |
src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupProviders.ts |
Tags chat and inline-rename entry points. |
src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupContributions.ts |
Tags command, account, title bar, review, and URL sources. |
src/vs/workbench/contrib/chat/browser/chatSetup/chatSetup.ts |
Defines the allowlisted source enum and option. |
src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostAuth.ts |
Tags Agent Host authentication dialogs. |
src/vs/sessions/browser/sessionsSetUpService.ts |
Tags Agents onboarding dialogs. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Remove the redundant dialog surface field and environment-service dependency. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 8310b3e7-c24b-486a-802e-ef8efb5b3c0d
Joaquín Ruales (jruales)
marked this pull request as ready for review
September 16, 2026 00:20
Contributor
📬 CODENOTIFYThe following users are being notified based on files changed in this PR: Ladislau Szomoru (@lszomoru)Matched files:
|
Joaquín Ruales (jruales)
enabled auto-merge (squash)
September 16, 2026 01:26
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Joaquín Ruales (jruales)
requested review from
TylerLeonhardt
and removed request for
TylerLeonhardt
September 16, 2026 20:57
TylerLeonhardt
approved these changes
Sep 16, 2026
Joaquín Ruales (jruales)
deleted the
jruales/chat-setup-dialog-telemetry
branch
September 16, 2026 21:34
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Add
chatSetup.dialogShownto measure displayed Copilot setup/sign-in dialogs rather than infer impressions from login attempts or setup outcomes.Related to #333139 and #335403. This adds diagnostic coverage; it does not claim to fix repeated sign-in prompting or establish credential loss.
Implementation
show()is invoked and before waiting for dismissal. Skipped/pre-cancelled setup does not emit; concurrent setup requests sharing a dialog count once, and a later redisplay counts again.source, sign-in/setupkind, currentaccountAvailable, theChatEntitlementenum name, andforceSignInDialog. Reuse the existingcommon.isAgentsWindowproperty to distinguish Agents windows from the regular workbench.commandcategory; unspecified or unrecognized sources areunknown.No authentication, entitlement, dialog presentation, or accessibility behavior is intentionally changed. No new setting or telemetry infrastructure is introduced.
Event schema
chatSetup.dialogShownregisters the following five fields. All are classified asSystemMetaData; event owner:jruales. Boolean fields are serialized as numeric measures (true=1,false=0). The event does not register a separate impression-count measure: count event rows.sourceFeatureInsightkindsignIn: the displayed buttons offer provider authentication.setup: no provider-authentication button; the dialog offers AI feature setup. Determined from button strategies, not localized/custom dialog text.FeatureInsightaccountAvailable0or11:currentDefaultAccountis non-null when the impression is recorded.0: no current default account, which can include pending initialization. Neither value establishes credential persistence, token validity, or interactive sign-in success.PerformanceAndHealthentitlementChatEntitlementenum name, listed below, taken from the setup context used to construct the dialog. This may be cached/last-known state, not a fresh server result.PerformanceAndHealthforceSignInDialog0or11: the caller explicitly setforceSignInDialog: true.0: the option was absent or not strictlytrue. This describes the request, not the displayed buttons; usekindto identify provider-sign-in dialogs.PerformanceAndHealthsourcevaluesunknowncommandworkbench.action.chat.triggerSetupcommand without more specific attribution; includes UI/API callers that do not supply a source.anonymousCommandworkbench.action.chat.triggerSetupSupportAnonymousAction) without more specific attribution. Does not mean the user is anonymous.forcedSignInCommandworkbench.action.chat.triggerSetupForceSignIncommand.accountstitleBarurlchatinlineRenamesessionsSetupagentHostscmcodeReviewchat.internal.reviewcommand.Concurrent callers sharing an open dialog do not emit additional impressions or replace the first caller's source. These values are caller attribution, not proof that a prompt was automatic or unwanted.
entitlementvaluesUnknownUnresolvedAvailableUnavailableFreeEDUProProPlusBusinessEnterpriseMaxExisting common window indicator (not newly registered)
The telemetry pipeline already adds
common.isAgentsWindow = truefor Agents windows (serialized as measure1); it is omitted, rather than explicitlyfalse, for other windows. It provides the workbench/Agents split without an event-specificsurfacefield. Existing common session/device correlation and timing fields are also reused, not registered again by this event.Interpretation and review
Filter
kind == 'signIn'to count provider-sign-in dialog displays in the telemetry-reporting population. This does not cover generic extension authentication permission dialogs, and an impression is not an interactive login attempt or success.The event includes typed privacy classifications with
jrualesas owner. Please review the new telemetry schema before merging.Validation
npm run typecheck-client— passed.npm run transpile-client— passed.git diff --check— passed.