Skip to content

Commit 8d0ba61

Browse files
authored
removes remnants of lightbulb telemetry (microsoft#217410)
remove telemetry
1 parent b66a2b0 commit 8d0ba61

File tree

2 files changed

+2
-52
lines changed

2 files changed

+2
-52
lines changed

src/vs/editor/contrib/codeAction/browser/codeActionController.ts

Lines changed: 1 addition & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,6 @@ import { registerThemingParticipant } from 'vs/platform/theme/common/themeServic
3939
import { CodeActionAutoApply, CodeActionFilter, CodeActionItem, CodeActionKind, CodeActionSet, CodeActionTrigger, CodeActionTriggerSource } from 'vs/editor/contrib/codeAction/common/types';
4040
import { CodeActionModel, CodeActionsState } from 'vs/editor/contrib/codeAction/browser/codeActionModel';
4141
import { HierarchicalKind } from 'vs/base/common/hierarchicalKind';
42-
import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry';
43-
4442

4543
interface IActionShowOptions {
4644
readonly includeDisabledActions?: boolean;
@@ -79,8 +77,7 @@ export class CodeActionController extends Disposable implements IEditorContribut
7977
@ICommandService private readonly _commandService: ICommandService,
8078
@IConfigurationService private readonly _configurationService: IConfigurationService,
8179
@IActionWidgetService private readonly _actionWidgetService: IActionWidgetService,
82-
@IInstantiationService private readonly _instantiationService: IInstantiationService,
83-
@ITelemetryService private readonly _telemetryService: ITelemetryService
80+
@IInstantiationService private readonly _instantiationService: IInstantiationService
8481
) {
8582
super();
8683

@@ -107,29 +104,6 @@ export class CodeActionController extends Disposable implements IEditorContribut
107104
}
108105

109106
private async showCodeActionsFromLightbulb(actions: CodeActionSet, at: IAnchor | IPosition): Promise<void> {
110-
111-
// Telemetry for showing code actions from lightbulb. Shows us how often it was clicked.
112-
type ShowCodeActionListEvent = {
113-
codeActionListLength: number;
114-
codeActions: string[];
115-
codeActionProviders: string[];
116-
};
117-
118-
type ShowListEventClassification = {
119-
codeActionListLength: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; comment: 'The length of the code action list from the lightbulb widget.' };
120-
codeActions: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; comment: 'The title of code actions in this menu.' };
121-
codeActionProviders: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; comment: 'The provider of code actions in this menu.' };
122-
owner: 'justschen';
123-
comment: 'Event used to gain insights into what code actions are being shown';
124-
};
125-
126-
this._telemetryService.publicLog2<ShowCodeActionListEvent, ShowListEventClassification>('codeAction.showCodeActionsFromLightbulb', {
127-
codeActionListLength: actions.validActions.length,
128-
codeActions: actions.validActions.map(action => action.action.title),
129-
codeActionProviders: actions.validActions.map(action => action.provider?.displayName ?? ''),
130-
});
131-
132-
133107
if (actions.allAIFixes && actions.validActions.length === 1) {
134108
const actionItem = actions.validActions[0];
135109
const command = actionItem.action.command;
@@ -312,28 +286,6 @@ export class CodeActionController extends Disposable implements IEditorContribut
312286
onHide: (didCancel?) => {
313287
this._editor?.focus();
314288
currentDecorations.clear();
315-
// Telemetry for showing code actions here. only log on `showLightbulb`. Logs when code action list is quit out.
316-
if (options.fromLightbulb && didCancel !== undefined) {
317-
type ShowCodeActionListEvent = {
318-
codeActionListLength: number;
319-
didCancel: boolean;
320-
codeActions: string[];
321-
};
322-
323-
type ShowListEventClassification = {
324-
codeActionListLength: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; comment: 'The length of the code action list when quit out. Can be from any code action menu.' };
325-
didCancel: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; comment: 'Whether the code action was cancelled or selected.' };
326-
codeActions: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; comment: 'What code actions were available when cancelled.' };
327-
owner: 'justschen';
328-
comment: 'Event used to gain insights into how many valid code actions are being shown';
329-
};
330-
331-
this._telemetryService.publicLog2<ShowCodeActionListEvent, ShowListEventClassification>('codeAction.showCodeActionList.onHide', {
332-
codeActionListLength: actions.validActions.length,
333-
didCancel: didCancel,
334-
codeActions: actions.validActions.map(action => action.action.title),
335-
});
336-
}
337289
},
338290
onHover: async (action: CodeActionItem, token: CancellationToken) => {
339291
if (token.isCancellationRequested) {

src/vs/editor/contrib/codeAction/browser/lightBulbWidget.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ import { computeIndentLevel } from 'vs/editor/common/model/utils';
1717
import { autoFixCommandId, quickFixCommandId } from 'vs/editor/contrib/codeAction/browser/codeAction';
1818
import { CodeActionSet, CodeActionTrigger } from 'vs/editor/contrib/codeAction/common/types';
1919
import * as nls from 'vs/nls';
20-
import { ICommandService } from 'vs/platform/commands/common/commands';
2120
import { IKeybindingService } from 'vs/platform/keybinding/common/keybinding';
2221

2322
namespace LightBulbState {
@@ -62,8 +61,7 @@ export class LightBulbWidget extends Disposable implements IContentWidget {
6261

6362
constructor(
6463
private readonly _editor: ICodeEditor,
65-
@IKeybindingService private readonly _keybindingService: IKeybindingService,
66-
@ICommandService commandService: ICommandService
64+
@IKeybindingService private readonly _keybindingService: IKeybindingService
6765
) {
6866
super();
6967

0 commit comments

Comments
 (0)