提交 eb755a34 编写于 作者: B Benjamin Pasero

remove some telemetry events that are not needed anymore

上级 0c60476e
......@@ -61,10 +61,6 @@ export interface IShowOptions {
inputSelection?: IRange;
}
export interface IQuickOpenUsageLogger {
publicLog(eventName: string, data?: any): void;
}
export class QuickOpenController extends DefaultController {
public onContextMenu(tree: ITree, element: any, event: ContextMenuEvent): boolean {
......@@ -115,14 +111,13 @@ export class QuickOpenWidget implements IModelProvider {
private container: HTMLElement;
private treeElement: HTMLElement;
private inputElement: HTMLElement;
private usageLogger: IQuickOpenUsageLogger;
private layoutDimensions: Dimension;
private model: IModel<any>;
private inputChangingTimeoutHandle: number;
private styles: IQuickOpenStyles;
private renderer: Renderer;
constructor(container: HTMLElement, callbacks: IQuickOpenCallbacks, options: IQuickOpenOptions, usageLogger?: IQuickOpenUsageLogger) {
constructor(container: HTMLElement, callbacks: IQuickOpenCallbacks, options: IQuickOpenOptions) {
this.isDisposed = false;
this.toUnbind = [];
this.container = container;
......@@ -130,7 +125,6 @@ export class QuickOpenWidget implements IModelProvider {
this.options = options;
this.styles = options || Object.create(null);
mixin(this.styles, defaultStyles, false);
this.usageLogger = usageLogger;
this.model = null;
}
......@@ -526,21 +520,6 @@ export class QuickOpenWidget implements IModelProvider {
hide = this.model.runner.run(value, mode, context);
}
// add telemetry when an item is accepted, logging the index of the item in the list and the length of the list
// to measure the rate of the success and the relevance of the order
if (this.usageLogger) {
const indexOfAcceptedElement = this.model.entries.indexOf(value);
const entriesCount = this.model.entries.length;
/* __GDPR__
"quickOpenWidgetItemAccepted" : {
"index" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" },
"count": { "classification": "SystemMetaData", "purpose": "FeatureInsight" },
"isQuickNavigate": { "classification": "SystemMetaData", "purpose": "FeatureInsight" }
}
*/
this.usageLogger.publicLog('quickOpenWidgetItemAccepted', { index: indexOfAcceptedElement, count: entriesCount, isQuickNavigate: this.quickNavigateConfiguration ? true : false });
}
// Hide if command was run successfully
if (hide) {
this.hide(HideReason.ELEMENT_SELECTED);
......@@ -775,22 +754,6 @@ export class QuickOpenWidget implements IModelProvider {
this.builder.hide();
this.builder.domBlur();
// report failure cases
if (reason === HideReason.CANCELED) {
if (this.model) {
const entriesCount = this.model.entries.filter(e => this.isElementVisible(this.model, e)).length;
if (this.usageLogger) {
/* __GDPR__
"quickOpenWidgetCancelled" : {
"count" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" },
"isQuickNavigate": { "classification": "SystemMetaData", "purpose": "FeatureInsight" }
}
*/
this.usageLogger.publicLog('quickOpenWidgetCancelled', { count: entriesCount, isQuickNavigate: this.quickNavigateConfiguration ? true : false });
}
}
}
// Clear input field and clear tree
this.inputBox.value = '';
this.tree.setInput(null);
......
......@@ -48,8 +48,7 @@ export class QuickOpenEditorWidget implements IOverlayWidget {
inputPlaceHolder: null,
inputAriaLabel: configuration.inputAriaLabel,
keyboardSupport: true
},
null
}
);
this.styler = attachQuickOpenStyler(this.quickOpenWidget, this.themeService);
......
......@@ -26,10 +26,10 @@ import { IConstructorSignature0, IInstantiationService } from 'vs/platform/insta
* layout and focus call, but only one create and dispose call.
*/
export abstract class Composite extends Component implements IComposite {
private _telemetryData: any = {};
private _onTitleAreaUpdate: Emitter<void>;
private visible: boolean;
private parent: Builder;
private _onTitleAreaUpdate: Emitter<void>;
protected actionRunner: IActionRunner;
......@@ -100,42 +100,6 @@ export abstract class Composite extends Component implements IComposite {
public setVisible(visible: boolean): TPromise<void> {
this.visible = visible;
// Reset telemetry data when composite becomes visible
if (visible) {
this._telemetryData = {};
this._telemetryData.startTime = new Date();
// Only submit telemetry data when not running from an integration test
if (this._telemetryService && this._telemetryService.publicLog) {
const eventName: string = 'compositeOpen';
/* __GDPR__
"compositeOpen" : {
"composite" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" }
}
*/
this._telemetryService.publicLog(eventName, { composite: this.getId() });
}
}
// Send telemetry data when composite hides
else {
this._telemetryData.timeSpent = (Date.now() - this._telemetryData.startTime) / 1000;
delete this._telemetryData.startTime;
// Only submit telemetry data when not running from an integration test
if (this._telemetryService && this._telemetryService.publicLog) {
const eventName: string = 'compositeShown';
this._telemetryData.composite = this.getId();
/* __GDPR__
"compositeShown" : {
"timeSpent" : { "classification": "SystemMetaData", "purpose": "PerformanceAndHealth" },
"composite": { "classification": "SystemMetaData", "purpose": "FeatureInsight" }
}
*/
this._telemetryService.publicLog(eventName, this._telemetryData);
}
}
return TPromise.as(null);
}
......
......@@ -21,7 +21,6 @@ import { isMacintosh } from 'vs/base/common/platform';
import { IWorkbenchEditorService } from 'vs/workbench/services/editor/common/editorService';
import { Position, POSITIONS } from 'vs/platform/editor/common/editor';
import { IEditorGroupService, IEditorTabOptions, GroupArrangement, GroupOrientation } from 'vs/workbench/services/group/common/groupService';
import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry';
import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation';
import { ServiceCollection } from 'vs/platform/instantiation/common/serviceCollection';
import { IContextKeyService } from 'vs/platform/contextkey/common/contextkey';
......@@ -147,7 +146,6 @@ export class EditorGroupsControl extends Themable implements IEditorGroupsContro
groupOrientation: GroupOrientation,
@IWorkbenchEditorService private editorService: IWorkbenchEditorService,
@IEditorGroupService private editorGroupService: IEditorGroupService,
@ITelemetryService private telemetryService: ITelemetryService,
@IContextKeyService private contextKeyService: IContextKeyService,
@IExtensionService private extensionService: IExtensionService,
@IInstantiationService private instantiationService: IInstantiationService,
......@@ -444,15 +442,6 @@ export class EditorGroupsControl extends Themable implements IEditorGroupsContro
// Automatically maximize this position if it is minimized
if (this.isSiloMinimized(this.lastActivePosition)) {
// Log this fact in telemetry
if (this.telemetryService) {
/* __GDPR__
"workbenchEditorMaximized" : {}
*/
this.telemetryService.publicLog('workbenchEditorMaximized');
}
let remainingSize = this.totalSize;
let layout = false;
......
......@@ -166,15 +166,6 @@ export class EditorPart extends Part implements IEditorPart, IEditorGroupService
};
this.revealIfOpen = editorConfig.revealIfOpen;
/* __GDPR__
"workbenchEditorConfiguration" : {
"${include}": [
"${IWorkbenchEditorConfiguration}"
]
}
*/
this.telemetryService.publicLog('workbenchEditorConfiguration', objects.deepClone(editorConfig)); // Clone because telemetry service will modify the passed data by adding more details.
} else {
this.tabOptions = {
previewEditors: true,
......@@ -359,16 +350,6 @@ export class EditorPart extends Part implements IEditorPart, IEditorGroupService
return TPromise.wrapError<BaseEditor>(new Error(strings.format('Can not find a registered editor for the input {0}', input)));
}
// Opened to the side
if (position !== Position.ONE) {
/* __GDPR__
"workbenchSideEditorOpened" : {
"position" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" }
}
*/
this.telemetryService.publicLog('workbenchSideEditorOpened', { position: position });
}
// Update stacks: We do this early on before the UI is there because we want our stacks model to have
// a consistent view of the editor world and updating it later async after the UI is there will cause
// issues (e.g. when a closeEditor call is made that expects the openEditor call to have updated the
......
......@@ -42,7 +42,6 @@ import { IPickOpenEntry, IFilePickOpenEntry, IInputOptions, IQuickOpenService, I
import { IConfigurationService } from 'vs/platform/configuration/common/configuration';
import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation';
import { IMessageService, Severity } from 'vs/platform/message/common/message';
import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry';
import { IWorkspaceContextService } from 'vs/platform/workspace/common/workspace';
import { IContextKeyService, RawContextKey, IContextKey } from 'vs/platform/contextkey/common/contextkey';
import { IHistoryService } from 'vs/workbench/services/history/common/history';
......@@ -104,7 +103,6 @@ export class QuickOpenController extends Component implements IQuickOpenService
constructor(
@IWorkbenchEditorService private editorService: IWorkbenchEditorService,
@IMessageService private messageService: IMessageService,
@ITelemetryService private telemetryService: ITelemetryService,
@IContextKeyService private contextKeyService: IContextKeyService,
@IConfigurationService private configurationService: IConfigurationService,
@IInstantiationService private instantiationService: IInstantiationService,
......@@ -313,8 +311,7 @@ export class QuickOpenController extends Component implements IQuickOpenService
}, {
inputPlaceHolder: options.placeHolder || '',
keyboardSupport: false
},
this.telemetryService
}
);
this.toUnbind.push(attachQuickOpenStyler(this.pickOpenWidget, this.themeService, { background: SIDE_BAR_BACKGROUND, foreground: SIDE_BAR_FOREGROUND }));
......@@ -555,14 +552,6 @@ export class QuickOpenController extends Component implements IQuickOpenService
const registry = Registry.as<IQuickOpenRegistry>(Extensions.Quickopen);
const handlerDescriptor = registry.getQuickOpenHandler(prefix) || registry.getDefaultQuickOpenHandler();
/* __GDPR__
"quickOpenWidgetShown" : {
"mode" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" },
"quickNavigate": { "${inline}": [ "${IQuickNavigateConfiguration}" ] }
}
*/
this.telemetryService.publicLog('quickOpenWidgetShown', { mode: handlerDescriptor.getId(), quickNavigate: quickNavigateConfiguration });
// Trigger onOpen
this.resolveHandler(handlerDescriptor).done(null, errors.onUnexpectedError);
......@@ -580,8 +569,7 @@ export class QuickOpenController extends Component implements IQuickOpenService
}, {
inputPlaceHolder: this.hasHandler(HELP_PREFIX) ? nls.localize('quickOpenInput', "Type '?' to get help on the actions you can take from here") : '',
keyboardSupport: false
},
this.telemetryService
}
);
this.toUnbind.push(attachQuickOpenStyler(this.quickOpenWidget, this.themeService, { background: SIDE_BAR_BACKGROUND, foreground: SIDE_BAR_FOREGROUND }));
......
......@@ -20,7 +20,6 @@ import { ILifecycleService, ShutdownReason } from 'vs/platform/lifecycle/common/
import { IWorkspaceContextService, WorkbenchState } from 'vs/platform/workspace/common/workspace';
import { IFileService, IResolveContentOptions, IFilesConfiguration, FileOperationError, FileOperationResult, AutoSaveConfiguration, HotExitConfiguration } from 'vs/platform/files/common/files';
import { IConfigurationService } from 'vs/platform/configuration/common/configuration';
import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry';
import { IDisposable, dispose } from 'vs/base/common/lifecycle';
import { IEnvironmentService } from 'vs/platform/environment/common/environment';
import { IUntitledEditorService, UNTITLED_SCHEMA } from 'vs/workbench/services/untitled/common/untitledEditorService';
......@@ -62,7 +61,6 @@ export abstract class TextFileService implements ITextFileService {
private lifecycleService: ILifecycleService,
private contextService: IWorkspaceContextService,
private configurationService: IConfigurationService,
private telemetryService: ITelemetryService,
protected fileService: IFileService,
private untitledEditorService: IUntitledEditorService,
private instantiationService: IInstantiationService,
......@@ -87,15 +85,6 @@ export abstract class TextFileService implements ITextFileService {
this.onFilesConfigurationChange(configuration);
/* __GDPR__
"autoSave" : {
"${include}": [
"${IAutoSaveConfiguration}"
]
}
*/
this.telemetryService.publicLog('autoSave', this.getAutoSaveConfiguration());
this.registerListeners();
}
......@@ -222,16 +211,6 @@ export abstract class TextFileService implements ITextFileService {
return TPromise.as({ didBackup: false });
}
// Telemetry
/* __GDPR__
"hotExit:triggered" : {
"reason" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" },
"windowCount": { "classification": "SystemMetaData", "purpose": "FeatureInsight" },
"fileCount": { "classification": "SystemMetaData", "purpose": "FeatureInsight" }
}
*/
this.telemetryService.publicLog('hotExit:triggered', { reason, windowCount, fileCount: dirtyToBackup.length });
// Backup
return this.backupAll(dirtyToBackup, textFileEditorModelManager).then(() => { return { didBackup: true }; });
});
......
......@@ -18,7 +18,6 @@ import { IUntitledEditorService } from 'vs/workbench/services/untitled/common/un
import { IFileService, IResolveContentOptions } from 'vs/platform/files/common/files';
import { IWorkspaceContextService } from 'vs/platform/workspace/common/workspace';
import { ILifecycleService } from 'vs/platform/lifecycle/common/lifecycle';
import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry';
import { IConfigurationService } from 'vs/platform/configuration/common/configuration';
import { IModeService } from 'vs/editor/common/services/modeService';
import { ModelBuilder } from 'vs/workbench/services/textfile/electron-browser/modelBuilder';
......@@ -41,7 +40,6 @@ export class TextFileService extends AbstractTextFileService {
@IUntitledEditorService untitledEditorService: IUntitledEditorService,
@ILifecycleService lifecycleService: ILifecycleService,
@IInstantiationService instantiationService: IInstantiationService,
@ITelemetryService telemetryService: ITelemetryService,
@IConfigurationService configurationService: IConfigurationService,
@IModeService private modeService: IModeService,
@IWindowService private windowService: IWindowService,
......@@ -51,7 +49,7 @@ export class TextFileService extends AbstractTextFileService {
@IWindowsService windowsService: IWindowsService,
@IHistoryService historyService: IHistoryService
) {
super(lifecycleService, contextService, configurationService, telemetryService, fileService, untitledEditorService, instantiationService, messageService, environmentService, backupFileService, windowsService, historyService);
super(lifecycleService, contextService, configurationService, fileService, untitledEditorService, instantiationService, messageService, environmentService, backupFileService, windowsService, historyService);
}
public resolveTextContent(resource: URI, options?: IResolveContentOptions): TPromise<IRawTextContent> {
......
......@@ -168,7 +168,6 @@ export class TestTextFileService extends TextFileService {
@ILifecycleService lifecycleService: ILifecycleService,
@IWorkspaceContextService contextService: IWorkspaceContextService,
@IConfigurationService configurationService: IConfigurationService,
@ITelemetryService telemetryService: ITelemetryService,
@IWorkbenchEditorService editorService: IWorkbenchEditorService,
@IFileService fileService: IFileService,
@IUntitledEditorService untitledEditorService: IUntitledEditorService,
......@@ -178,7 +177,7 @@ export class TestTextFileService extends TextFileService {
@IWindowsService windowsService: IWindowsService,
@IHistoryService historyService: IHistoryService
) {
super(lifecycleService, contextService, configurationService, telemetryService, fileService, untitledEditorService, instantiationService, messageService, TestEnvironmentService, backupFileService, windowsService, historyService);
super(lifecycleService, contextService, configurationService, fileService, untitledEditorService, instantiationService, messageService, TestEnvironmentService, backupFileService, windowsService, historyService);
}
public setPromptPath(path: string): void {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册