Log aggressiveness level and user happiness score to telemetry#2897
Merged
benibenj merged 2 commits intomicrosoft:mainfrom Jan 19, 2026
Merged
Log aggressiveness level and user happiness score to telemetry#2897benibenj merged 2 commits intomicrosoft:mainfrom
benibenj merged 2 commits intomicrosoft:mainfrom
Conversation
9b7d379 to
32202ad
Compare
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds telemetry logging for the adaptive aggressiveness feature used in the Xtab inline edits system. The changes enable data collection to analyze and validate the user happiness score algorithm by recording the aggressiveness level and happiness score when inline edits are shown.
Changes:
- Modified
getAggressivenessLevel()to return both the aggressiveness level and the user happiness score as an object to avoid race conditions in telemetry logging - Added telemetry builder methods (
setXtabAggressivenessLevelandsetXtabUserHappinessScore) to capture these values - Updated telemetry metadata with proper GDPR annotations for the new fields
- Logged telemetry only when using the
XtabAggressivenessprompting strategy
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| src/extension/inlineEdits/common/userInteractionMonitor.ts | Changed getAggressivenessLevel() return type from AggressivenessLevel to an object containing both the level and optional happiness score |
| src/platform/inlineEdits/common/statelessNextEditProvider.ts | Added new telemetry fields (xtabAggressivenessLevel, xtabUserHappinessScore) and corresponding setter methods in the telemetry builder |
| src/extension/xtab/node/xtabProvider.ts | Updated to destructure the new return value from getAggressivenessLevel() and conditionally log telemetry when using XtabAggressiveness prompting strategy |
| src/extension/inlineEdits/node/nextEditProviderTelemetry.ts | Added GDPR annotations for the new telemetry fields and included them in the telemetry event payload |
benibenj
approved these changes
Jan 19, 2026
alexr00
approved these changes
Jan 19, 2026
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
This PR adds telemetry logging for the adaptive aggressiveness feature, enabling data collection to analyze and improve the user happiness score algorithm.
Changes
Telemetry Properties Added
The following properties are now logged:
aggressivenessLevel: The current aggressiveness threshold being useduserHappinessScore: The calculated happiness score based on recent user actions (accepts, rejects, ignores)Purpose
This data will help us validate that the adaptive aggressiveness algorithm correlates with desired settings.