Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Oct 21, 2025

Summary

This PR fixes two telemetry classification types in chatWidget.ts that were missing the required isMeasurement: true flag for their measurement properties.

Changes

Added isMeasurement: true to the following telemetry classifications to comply with VS Code's telemetry guidelines:

1. CancelRequestEventEditClassification (line 2098)

Added the flag to the editCanceled boolean field:

editCanceled: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; isMeasurement: true; comment: 'Indicates whether the edit was canceled.' };

2. ChatEditingWorkingSetClassification (lines 2675-2676)

Added the flag to both numeric fields:

originalSize: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; isMeasurement: true; comment: 'The number of files that the user tried to attach in their editing request.' };
actualSize: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; isMeasurement: true; comment: 'The number of files that were actually sent in their editing request.' };

Context

According to VS Code's telemetry guidelines, isMeasurement: true is required for all numeric values and boolean flags used in calculations or metrics. These properties track feature usage counts and success/failure indicators, making them measurement values that should be marked accordingly.

Testing

  • ✅ TypeScript compilation passes with 0 errors
  • ✅ No other telemetry events in the file require similar fixes
Original prompt

Problem

Two telemetry events in chatWidget.ts are missing the required isMeasurement: true flag for their measurement properties, which violates VS Code's telemetry guidelines.

Required Changes

Fix the following telemetry classifications in /Users/digitarald/Developer/vscode/src/vs/workbench/contrib/chat/browser/chatWidget.ts:

1. CancelRequestEventEditClassification (around line 2131-2142)

The editCanceled boolean field needs isMeasurement: true:

type CancelRequestEventEditClassification = {
	owner: 'justschen';
	editRequestType: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; comment: 'Current entry point for editing a request.' };
	editCanceled: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; isMeasurement: true; comment: 'Indicates whether the edit was canceled.' };
	comment: 'Event used to gain insights into when edits are being canceled.';
};

2. ChatEditingWorkingSetClassification (around line 2716-2730)

Both originalSize and actualSize numeric fields need isMeasurement: true:

type ChatEditingWorkingSetClassification = {
	owner: 'joyceerhl';
	comment: 'Information about the working set size in a chat editing request';
	originalSize: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; isMeasurement: true; comment: 'The number of files that the user tried to attach in their editing request.' };
	actualSize: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; isMeasurement: true; comment: 'The number of files that were actually sent in their editing request.' };
};

Guidelines Reference

According to VS Code's telemetry guidelines:

  • isMeasurement: true is required for all numeric values and boolean flags used in calculations or metrics
  • This includes counts, durations, and boolean flags that track feature usage

Testing

After making these changes:

  1. Verify TypeScript compilation passes
  2. Ensure no other telemetry events in the file need similar fixes (already verified - these are the only two)

✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI changed the title [WIP] Fix telemetry events in chatWidget.ts to include isMeasurement flag Add missing isMeasurement flags to telemetry events in chatWidget.ts Oct 21, 2025
Copilot AI requested a review from digitarald October 21, 2025 17:52
Copilot finished work on behalf of digitarald October 21, 2025 17:52
@digitarald digitarald marked this pull request as ready for review October 21, 2025 22:25
Copilot AI review requested due to automatic review settings October 21, 2025 22:25
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds missing isMeasurement: true flags to telemetry classification types in chatWidget.ts to comply with VS Code's telemetry guidelines, which require this flag for all numeric values and boolean flags used in calculations or metrics.

Key changes:

  • Added isMeasurement: true to boolean field editCanceled in CancelRequestEventEditClassification
  • Added isMeasurement: true to numeric fields originalSize and actualSize in ChatEditingWorkingSetClassification

@digitarald digitarald requested a review from justschen October 21, 2025 22:26
@vs-code-engineering vs-code-engineering bot added this to the October 2025 milestone Oct 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants