Add openRecentFolder telemetry (fixes #19865)

This commit is contained in:
Christof Marti
2017-02-03 08:58:10 -08:00
parent 3eddf71678
commit b0033cb76b

View File

@@ -31,6 +31,7 @@ import { IBackupFileService } from 'vs/workbench/services/backup/common/backup';
import { IMessageService, Severity } from 'vs/platform/message/common/message';
const enabledKey = 'workbench.welcome.enabled';
const telemetryFrom = 'welcomePage';
export class WelcomePageContribution implements IWorkbenchContribution {
@@ -101,7 +102,7 @@ class WelcomePage {
const recentlyOpened = this.windowService.getRecentlyOpen();
const uri = URI.parse(require.toUrl('./vs_code_welcome_page.html'))
.with({ scheme: Schemas.walkThrough });
const input = this.instantiationService.createInstance(WalkThroughInput, localize('welcome.title', "Welcome"), '', uri, 'welcomePage', container => this.onReady(container, recentlyOpened));
const input = this.instantiationService.createInstance(WalkThroughInput, localize('welcome.title', "Welcome"), '', uri, telemetryFrom, container => this.onReady(container, recentlyOpened));
this.editorService.openEditor(input, { pinned: true }, Position.ONE)
.then(null, onUnexpectedError);
}
@@ -143,6 +144,10 @@ class WelcomePage {
a.title = folder;
a.href = 'javascript:void(0)';
a.addEventListener('click', e => {
this.telemetryService.publicLog('workbenchActionExecuted', {
id: 'openRecentFolder',
from: telemetryFrom
});
this.windowsService.openWindow([folder]);
e.preventDefault();
e.stopPropagation();