Skip to content

Commit 960f567

Browse files
authored
Removes abbreviations in strongly typed telemetry events (microsoft#76478)
* Remove abbreviations * Fixed spelling mistake
1 parent f7c692a commit 960f567

18 files changed

Lines changed: 48 additions & 48 deletions

File tree

src/vs/base/common/actions.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,12 @@ export interface ITelemetryData {
1212
[key: string]: any;
1313
}
1414

15-
export type WBActionExecutedClassification = {
15+
export type WorkbenchActionExecutedClassification = {
1616
id: { classification: 'SystemMetaData', purpose: 'FeatureInsight' };
1717
from: { classification: 'SystemMetaData', purpose: 'FeatureInsight' };
1818
};
1919

20-
export type WBActionExecutedEvent = {
20+
export type WorkbenchActionExecutedEvent = {
2121
id: string;
2222
from: string;
2323
};

src/vs/platform/contextview/browser/contextMenuHandler.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55

66
import 'vs/css!./contextMenuHandler';
77

8+
import { ActionRunner, IRunEvent, WorkbenchActionExecutedEvent, WorkbenchActionExecutedClassification } from 'vs/base/common/actions';
89
import { combinedDisposable, DisposableStore } from 'vs/base/common/lifecycle';
9-
import { ActionRunner, IRunEvent, WBActionExecutedEvent, WBActionExecutedClassification } from 'vs/base/common/actions';
1010
import { Menu } from 'vs/base/browser/ui/menu/menu';
1111
import { IContextViewService } from 'vs/platform/contextview/browser/contextView';
1212
import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry';
@@ -132,7 +132,7 @@ export class ContextMenuHandler {
132132

133133
private onActionRun(e: IRunEvent): void {
134134
if (this.telemetryService) {
135-
this.telemetryService.publicLog2<WBActionExecutedEvent, WBActionExecutedClassification>('workbenchActionExecuted', { id: e.action.id, from: 'contextMenu' });
135+
this.telemetryService.publicLog2<WorkbenchActionExecutedEvent, WorkbenchActionExecutedClassification>('workbenchActionExecuted', { id: e.action.id, from: 'contextMenu' });
136136
}
137137

138138
this.contextViewService.hideContextView(false);

src/vs/platform/extensionManagement/node/extensionGalleryService.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -647,26 +647,26 @@ export class ExtensionGalleryService implements IExtensionGalleryService {
647647
}
648648

649649
const message = getErrorMessage(err);
650-
type GalleryServiceREClassification = {
650+
type GalleryServiceRequestErrorClassification = {
651651
url: { classification: 'SystemMetaData', purpose: 'FeatureInsight' };
652652
cdn: { classification: 'SystemMetaData', purpose: 'FeatureInsight', isMeasurement: true };
653653
message: { classification: 'CallstackOrException', purpose: 'FeatureInsight' };
654654
};
655-
type GalleryServiceREServiceEvent = {
655+
type GalleryServiceRequestErrorEvent = {
656656
url: string;
657657
cdn: boolean;
658658
message: string;
659659
};
660-
this.telemetryService.publicLog2<GalleryServiceREServiceEvent, GalleryServiceREClassification>('galleryService:requestError', { url, cdn: true, message });
661-
type GalleryServiceCDNFBClassification = {
660+
this.telemetryService.publicLog2<GalleryServiceRequestErrorEvent, GalleryServiceRequestErrorClassification>('galleryService:requestError', { url, cdn: true, message });
661+
type GalleryServiceCDNFallbackClassification = {
662662
url: { classification: 'SystemMetaData', purpose: 'FeatureInsight' };
663663
message: { classification: 'SystemMetaData', purpose: 'FeatureInsight' };
664664
};
665-
type GalleryServiceCDNFBEvent = {
665+
type GalleryServiceCDNFallbackEvent = {
666666
url: string;
667667
message: string;
668668
};
669-
this.telemetryService.publicLog2<GalleryServiceCDNFBEvent, GalleryServiceCDNFBClassification>('galleryService:cdnFallback', { url, message });
669+
this.telemetryService.publicLog2<GalleryServiceCDNFallbackEvent, GalleryServiceCDNFallbackClassification>('galleryService:cdnFallback', { url, message });
670670

671671
const fallbackOptions = assign({}, options, { url: fallbackUrl });
672672
return this.requestService.request(fallbackOptions, token).then(undefined, err => {
@@ -675,7 +675,7 @@ export class ExtensionGalleryService implements IExtensionGalleryService {
675675
}
676676

677677
const message = getErrorMessage(err);
678-
this.telemetryService.publicLog2<GalleryServiceREServiceEvent, GalleryServiceREClassification>('galleryService:requestError', { url: fallbackUrl, cdn: false, message });
678+
this.telemetryService.publicLog2<GalleryServiceRequestErrorEvent, GalleryServiceRequestErrorClassification>('galleryService:requestError', { url: fallbackUrl, cdn: false, message });
679679
return Promise.reject(err);
680680
});
681681
});

src/vs/platform/keybinding/common/abstractKeybindingService.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ import { IResolveResult, KeybindingResolver } from 'vs/platform/keybinding/commo
1616
import { ResolvedKeybindingItem } from 'vs/platform/keybinding/common/resolvedKeybindingItem';
1717
import { INotificationService } from 'vs/platform/notification/common/notification';
1818
import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry';
19-
import { WBActionExecutedEvent, WBActionExecutedClassification } from 'vs/base/common/actions';
19+
import { WorkbenchActionExecutedEvent, WorkbenchActionExecutedClassification } from 'vs/base/common/actions';
2020

2121
interface CurrentChord {
2222
keypress: string;
@@ -196,7 +196,7 @@ export abstract class AbstractKeybindingService extends Disposable implements IK
196196
} else {
197197
this._commandService.executeCommand(resolveResult.commandId, resolveResult.commandArgs).then(undefined, err => this._notificationService.warn(err));
198198
}
199-
this._telemetryService.publicLog2<WBActionExecutedEvent, WBActionExecutedClassification>('workbenchActionExecuted', { id: resolveResult.commandId, from: 'keybinding' });
199+
this._telemetryService.publicLog2<WorkbenchActionExecutedEvent, WorkbenchActionExecutedClassification>('workbenchActionExecuted', { id: resolveResult.commandId, from: 'keybinding' });
200200
}
201201

202202
return shouldPreventDefault;

src/vs/platform/menubar/electron-main/menubar.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ import { IMenubarData, IMenubarKeybinding, MenubarMenuItem, isMenubarMenuItemSep
2121
import { URI } from 'vs/base/common/uri';
2222
import { IStateService } from 'vs/platform/state/common/state';
2323
import { ILifecycleService } from 'vs/platform/lifecycle/electron-main/lifecycleMain';
24-
import { WBActionExecutedEvent, WBActionExecutedClassification } from 'vs/base/common/actions';
24+
import { WorkbenchActionExecutedEvent, WorkbenchActionExecutedClassification } from 'vs/base/common/actions';
2525

2626
const telemetryFrom = 'menu';
2727

@@ -784,7 +784,7 @@ export class Menubar {
784784
}
785785

786786
private reportMenuActionTelemetry(id: string): void {
787-
this.telemetryService.publicLog2<WBActionExecutedEvent, WBActionExecutedClassification>('workbenchActionExecuted', { id, from: telemetryFrom });
787+
this.telemetryService.publicLog2<WorkbenchActionExecutedEvent, WorkbenchActionExecutedClassification>('workbenchActionExecuted', { id, from: telemetryFrom });
788788
}
789789

790790
private mnemonicLabel(label: string): string {

src/vs/platform/telemetry/common/telemetryService.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,13 +57,13 @@ export class TelemetryService implements ITelemetryService {
5757
if (this._configurationService) {
5858
this._updateUserOptIn();
5959
this._configurationService.onDidChangeConfiguration(this._updateUserOptIn, this, this._disposables);
60-
type OptInClass = {
60+
type OptInClassification = {
6161
optIn: { classification: 'SystemMetaData', purpose: 'BusinessInsight', isMeasurement: true };
6262
};
6363
type OptInEvent = {
6464
optIn: boolean;
6565
};
66-
this.publicLog2<OptInEvent, OptInClass>('optInStatus', { optIn: this._userOptIn });
66+
this.publicLog2<OptInEvent, OptInClassification>('optInStatus', { optIn: this._userOptIn });
6767

6868
this._commonProperties.then(values => {
6969
const isHashedId = /^[a-f0-9]+$/i.test(values['common.machineId']);

src/vs/platform/telemetry/common/telemetryUtils.ts

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -195,27 +195,27 @@ const configurationValueWhitelist = [
195195
export function configurationTelemetry(telemetryService: ITelemetryService, configurationService: IConfigurationService): IDisposable {
196196
return configurationService.onDidChangeConfiguration(event => {
197197
if (event.source !== ConfigurationTarget.DEFAULT) {
198-
type UpdateConfigClassification = {
198+
type UpdateConfigurationClassification = {
199199
configurationSource: { classification: 'SystemMetaData', purpose: 'FeatureInsight' };
200200
configurationKeys: { classification: 'SystemMetaData', purpose: 'FeatureInsight' };
201201
};
202-
type UpdateConfigEvent = {
202+
type UpdateConfigurationEvent = {
203203
configurationSource: string;
204204
configurationKeys: string[];
205205
};
206-
telemetryService.publicLog2<UpdateConfigEvent, UpdateConfigClassification>('updateConfiguration', {
206+
telemetryService.publicLog2<UpdateConfigurationEvent, UpdateConfigurationClassification>('updateConfiguration', {
207207
configurationSource: ConfigurationTargetToString(event.source),
208208
configurationKeys: flattenKeys(event.sourceConfig)
209209
});
210-
type UpdateConfigValClassification = {
210+
type UpdateConfigurationValuesClassification = {
211211
configurationSource: { classification: 'SystemMetaData', purpose: 'FeatureInsight' };
212212
configurationValues: { classification: 'CustomerContent', purpose: 'FeatureInsight' };
213213
};
214-
type UpdateConfigValEvent = {
214+
type UpdateConfigurationValuesEvent = {
215215
configurationSource: string;
216216
configurationValues: { [key: string]: any }[];
217217
};
218-
telemetryService.publicLog2<UpdateConfigValEvent, UpdateConfigValClassification>('updateConfigurationValues', {
218+
telemetryService.publicLog2<UpdateConfigurationValuesEvent, UpdateConfigurationValuesClassification>('updateConfigurationValues', {
219219
configurationSource: ConfigurationTargetToString(event.source),
220220
configurationValues: flattenValues(event.sourceConfig, configurationValueWhitelist)
221221
});
@@ -226,13 +226,13 @@ export function configurationTelemetry(telemetryService: ITelemetryService, conf
226226
export function keybindingsTelemetry(telemetryService: ITelemetryService, keybindingService: IKeybindingService): IDisposable {
227227
return keybindingService.onDidUpdateKeybindings(event => {
228228
if (event.source === KeybindingSource.User && event.keybindings) {
229-
type UpdateKBClassification = {
229+
type UpdateKeybindingsClassification = {
230230
bindings: { classification: 'CustomerContent', purpose: 'FeatureInsight' };
231231
};
232-
type UpdateKBEvents = {
232+
type UpdateKeybindingsEvents = {
233233
bindings: { key: string, command: string, when: string | undefined, args: boolean | undefined }[];
234234
};
235-
telemetryService.publicLog2<UpdateKBEvents, UpdateKBClassification>('updateKeybindings', {
235+
telemetryService.publicLog2<UpdateKeybindingsEvents, UpdateKeybindingsClassification>('updateKeybindings', {
236236
bindings: event.keybindings.map(binding => ({
237237
key: binding.key,
238238
command: binding.command,

src/vs/workbench/browser/parts/compositePart.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import { ToolBar } from 'vs/base/browser/ui/toolbar/toolbar';
1414
import { IActionViewItem, ActionsOrientation } from 'vs/base/browser/ui/actionbar/actionbar';
1515
import { ProgressBar } from 'vs/base/browser/ui/progressbar/progressbar';
1616
import { prepareActions } from 'vs/workbench/browser/actions';
17-
import { IAction, WBActionExecutedEvent, WBActionExecutedClassification } from 'vs/base/common/actions';
17+
import { IAction, WorkbenchActionExecutedEvent, WorkbenchActionExecutedClassification } from 'vs/base/common/actions';
1818
import { Part, IPartOptions } from 'vs/workbench/browser/part';
1919
import { Composite, CompositeRegistry } from 'vs/workbench/browser/composite';
2020
import { IComposite } from 'vs/workbench/common/composite';
@@ -261,7 +261,7 @@ export abstract class CompositePart<T extends Composite> extends Part {
261261

262262
// Log in telemetry
263263
if (this.telemetryService) {
264-
this.telemetryService.publicLog2<WBActionExecutedEvent, WBActionExecutedClassification>('workbenchActionExecuted', { id: e.action.id, from: this.nameForTelemetry });
264+
this.telemetryService.publicLog2<WorkbenchActionExecutedEvent, WorkbenchActionExecutedClassification>('workbenchActionExecuted', { id: e.action.id, from: this.nameForTelemetry });
265265
}
266266
});
267267

src/vs/workbench/browser/parts/editor/titleControl.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import { addDisposableListener, Dimension, EventType } from 'vs/base/browser/dom
88
import { StandardMouseEvent } from 'vs/base/browser/mouseEvent';
99
import { ActionsOrientation, IActionViewItem } from 'vs/base/browser/ui/actionbar/actionbar';
1010
import { ToolBar } from 'vs/base/browser/ui/toolbar/toolbar';
11-
import { IAction, IRunEvent, WBActionExecutedEvent, WBActionExecutedClassification } from 'vs/base/common/actions';
11+
import { IAction, IRunEvent, WorkbenchActionExecutedEvent, WorkbenchActionExecutedClassification } from 'vs/base/common/actions';
1212
import * as arrays from 'vs/base/common/arrays';
1313
import { ResolvedKeybinding } from 'vs/base/common/keyCodes';
1414
import { dispose, DisposableStore } from 'vs/base/common/lifecycle';
@@ -152,7 +152,7 @@ export abstract class TitleControl extends Themable {
152152

153153
// Log in telemetry
154154
if (this.telemetryService) {
155-
this.telemetryService.publicLog2<WBActionExecutedEvent, WBActionExecutedClassification>('workbenchActionExecuted', { id: e.action.id, from: 'editorPart' });
155+
this.telemetryService.publicLog2<WorkbenchActionExecutedEvent, WorkbenchActionExecutedClassification>('workbenchActionExecuted', { id: e.action.id, from: 'editorPart' });
156156
}
157157
}));
158158
}

src/vs/workbench/browser/parts/notifications/notificationsActions.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
import 'vs/css!./media/notificationsActions';
77
import { INotificationViewItem } from 'vs/workbench/common/notifications';
88
import { localize } from 'vs/nls';
9-
import { Action, IAction, ActionRunner, WBActionExecutedEvent, WBActionExecutedClassification } from 'vs/base/common/actions';
9+
import { Action, IAction, ActionRunner, WorkbenchActionExecutedEvent, WorkbenchActionExecutedClassification } from 'vs/base/common/actions';
1010
import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry';
1111
import { INotificationService } from 'vs/platform/notification/common/notification';
1212
import { CLEAR_NOTIFICATION, EXPAND_NOTIFICATION, COLLAPSE_NOTIFICATION, CLEAR_ALL_NOTIFICATIONS, HIDE_NOTIFICATIONS_CENTER } from 'vs/workbench/browser/parts/notifications/notificationsCommands';
@@ -161,7 +161,7 @@ export class NotificationActionRunner extends ActionRunner {
161161
}
162162

163163
protected async runAction(action: IAction, context: INotificationViewItem): Promise<any> {
164-
this.telemetryService.publicLog2<WBActionExecutedEvent, WBActionExecutedClassification>('workbenchActionExecuted', { id: action.id, from: 'message' });
164+
this.telemetryService.publicLog2<WorkbenchActionExecutedEvent, WorkbenchActionExecutedClassification>('workbenchActionExecuted', { id: action.id, from: 'message' });
165165

166166
// Run and make sure to notify on any error again
167167
try {

0 commit comments

Comments
 (0)