提交 10cea073 编写于 作者: K kieferrm 提交者: Kai Maetzel

first batch events

上级 32681611
......@@ -1239,6 +1239,12 @@ export class CodeMenu {
}
private reportMenuActionTelemetry(id: string): void {
/* __GDPR__
"workbencActionExecuted" : {
"id" : { "endPoint": "none", "classification": "SystemMetaData", "purpose": "FeatureInsight" },
"from": { "endPoint": "none", "classification": "SystemMetaData", "purpose": "FeatureInsight" }
}
*/
this.telemetryService.publicLog('workbenchActionExecuted', { id, from: telemetryFrom });
}
......
......@@ -406,6 +406,14 @@ class MarkerNavigationAction extends EditorAction {
}
let model = controller.getOrCreateModel();
/* __GDPR__
"zoneWidgetShown" : {
"mode" : { "endPoint": "none", "classification": "SystemMetaData", "purpose": "FeatureInsight" },
"${include}": [
"${EditorTelemetryData}"
]
}
*/
telemetryService.publicLog('zoneWidgetShown', { mode: 'go to error', ...editor.getTelemetryData() });
if (model) {
if (this._isNext) {
......
......@@ -161,6 +161,12 @@ export class ReferencesController implements editorCommon.IEditorContribution {
const startTime = Date.now();
this._disposables.push({
dispose: () => {
/* __GDPR__
"zoneWidgetShown" : {
"mode" : { "endPoint": "none", "classification": "SystemMetaData", "purpose": "FeatureInsight" },
"elapsedTime": { "endPoint": "none", "classification": "SystemMetaData", "purpose": "FeatureInsight" }
}
*/
this._telemetryService.publicLog('zoneWidgetShown', {
mode: 'reference search',
elapsedTime: Date.now() - startTime
......@@ -191,6 +197,12 @@ export class ReferencesController implements editorCommon.IEditorContribution {
const onDone = stopwatch(fromPromise(promise));
const mode = this._editor.getModel().getLanguageIdentifier().language;
/* __GDPR__
"findReferences" : {
"durarion" : { "endPoint": "none", "classification": "SystemMetaData", "purpose": "PerformanceAndHealth" },
"mode": { "endPoint": "none", "classification": "SystemMetaData", "purpose": "FeatureInsight" }
}
*/
onDone(duration => this._telemetryService.publicLog('findReferences', {
duration,
mode
......
......@@ -16,6 +16,14 @@ export interface ICompletionItem extends ISuggestionItem {
idx?: number;
}
/* __GDPR__FRAGMENT__
"ICompletionStats" : {
"suggestionCount" : { "endPoint": "none", "classification": "SystemMetaData", "purpose": "FeatureInsight" },
"snippetCount": { "endPoint": "none", "classification": "SystemMetaData", "purpose": "FeatureInsight" },
"textCount": { "endPoint": "none", "classification": "SystemMetaData", "purpose": "FeatureInsight" }
}
*/
export interface ICompletionStats {
suggestionCount: number;
snippetCount: number;
......
......@@ -197,6 +197,14 @@ export class SuggestController implements IEditorContribution {
}
this._alertCompletionItem(item);
/* __GDPR__
"suggestSnippetInsert" : {
"suggestionType" : { "endPoint": "none", "classification": "SystemMetaData", "purpose": "FeatureInsight" },
"${include}": [
"${EditorTelemetryData}"
]
}
*/
this._telemetryService.publicLog('suggestSnippetInsert', { ...this._editor.getTelemetryData(), suggestionType: suggestion.type });
}
......
......@@ -728,6 +728,15 @@ export class SuggestWidget implements IContentWidget, IDelegate<ICompletionItem>
} else {
const { stats } = this.completionModel;
stats['wasAutomaticallyTriggered'] = !!isAuto;
/* __GDPR__
"suggestWidget" : {
"wasAutomaticallyTriggered" : { "endPoint": "none", "classification": "SystemMetaData", "purpose": "FeatureInsight" },
"${include}": [
"${ICompletionStats}",
"${EditorTelemetryData}"
]
}
*/
this.telemetryService.publicLog('suggestWidget', { ...stats, ...this.editor.getTelemetryData() });
this.focusedItem = null;
......@@ -855,6 +864,13 @@ export class SuggestWidget implements IContentWidget, IDelegate<ICompletionItem>
this.details.element.style.borderColor = this.detailsFocusBorderColor;
}
}
/* __GDPR__
"suggestWidget:toggleDetailsFocus" : {
"${include}": [
"${EditorTelemetryData}"
]
}
*/
this.telemetryService.publicLog('suggestWidget:toggleDetailsFocus', this.editor.getTelemetryData());
}
......@@ -869,6 +885,13 @@ export class SuggestWidget implements IContentWidget, IDelegate<ICompletionItem>
removeClass(this.element, 'docs-side');
removeClass(this.element, 'docs-below');
this.editor.layoutContentWidget(this);
/* __GDPR__
"suggestWidget:collapseDetails" : {
"${include}": [
"${EditorTelemetryData}"
]
}
*/
this.telemetryService.publicLog('suggestWidget:collapseDetails', this.editor.getTelemetryData());
} else {
if (this.state !== State.Open && this.state !== State.Details) {
......@@ -877,6 +900,13 @@ export class SuggestWidget implements IContentWidget, IDelegate<ICompletionItem>
this.updateExpandDocsSetting(true);
this.showDetails();
/* __GDPR__
"suggestWidget:expandDetails" : {
"${include}": [
"${EditorTelemetryData}"
]
}
*/
this.telemetryService.publicLog('suggestWidget:expandDetails', this.editor.getTelemetryData());
}
......
......@@ -44,6 +44,12 @@ export class ContextMenuHandler {
this.toDispose.push(this.actionRunner.addListener(EventType.BEFORE_RUN, (e: any) => {
if (this.telemetryService) {
/* __GDPR__
"workbenchActionExecuted" : {
"id" : { "endPoint": "none", "classification": "SystemMetaData", "purpose": "FeatureInsight" },
"from": { "endPoint": "none", "classification": "SystemMetaData", "purpose": "FeatureInsight" }
}
*/
this.telemetryService.publicLog('workbenchActionExecuted', { id: e.action.id, from: 'contextMenu' });
}
......
......@@ -62,6 +62,21 @@ export function getLocalExtensionTelemetryData(extension: ILocalExtension): any
};
}
/* __GDPR__FRAGMENT__
"GalleryExtensionTelemetryData" : {
"id" : { "endPoint": "none", "classification": "SystemMetaData", "purpose": "FeatureInsight" },
"name": { "endPoint": "none", "classification": "SystemMetaData", "purpose": "FeatureInsight" },
"galleryId": { "endPoint": "none", "classification": "SystemMetaData", "purpose": "FeatureInsight" },
"publisherId": { "endPoint": "none", "classification": "PublicNonPersonalData", "purpose": "FeatureInsight" },
"publisherName": { "endPoint": "none", "classification": "PublicNonPersonalData", "purpose": "FeatureInsight" },
"publisherDisplayName": { "endPoint": "none", "classification": "PublicPersonalData", "purpose": "FeatureInsight" },
"dependencies": { "endPoint": "none", "classification": "SystemMetaData", "purpose": "FeatureInsight" },
"${include}": [
"${GalleryExtensionTelemetryData2}"
]
}
*/
export function getGalleryExtensionTelemetryData(extension: IGalleryExtension): any {
return {
id: extension.id,
......
......@@ -263,6 +263,13 @@ function toExtension(galleryExtension: IRawGalleryExtension, extensionsGalleryUr
dependencies: getDependencies(version),
engine: getEngine(version)
},
/* __GDPR__FRAGMENT__
"GalleryExtensionTelemetryData2" : {
"index" : { "endPoint": "none", "classification": "SystemMetaData", "purpose": "FeatureInsight" },
"searchText": { "endPoint": "none", "classification": "SystemMetaData", "purpose": "FeatureInsight" },
"querySource": { "endPoint": "none", "classification": "SystemMetaData", "purpose": "FeatureInsight" }
}
*/
telemetryData: {
index: ((query.pageNumber - 1) * query.pageSize) + index,
searchText: query.searchText,
......@@ -311,6 +318,12 @@ export class ExtensionGalleryService implements IExtensionGalleryService {
let text = options.text || '';
const pageSize = getOrDefault(options, o => o.pageSize, 50);
/* __GDPR__
"galleryService:query" : {
"type" : { "endPoint": "none", "classification": "SystemMetaData", "purpose": "FeatureInsight" },
"text": { "endPoint": "none", "classification": "SystemMetaData", "purpose": "FeatureInsight" }
}
*/
this.telemetryService.publicLog('galleryService:query', { type, text });
let query = new Query()
......@@ -426,6 +439,14 @@ export class ExtensionGalleryService implements IExtensionGalleryService {
const zipPath = path.join(tmpdir(), uuid.generateUuid());
const data = getGalleryExtensionTelemetryData(extension);
const startTime = new Date().getTime();
/* __GDPR__
"galleryService:downloadVSIX" : {
"duration": { "endPoint": "none", "classification": "SystemMetaData", "purpose": "PerformanceAndHealth," },
"${include}": [
"${GalleryExtensionTelemetryData}"
]
}
*/
const log = (duration: number) => this.telemetryService.publicLog('galleryService:downloadVSIX', assign(data, { duration }));
return this.getAsset(extension.assets.download)
......@@ -566,7 +587,20 @@ export class ExtensionGalleryService implements IExtensionGalleryService {
}
const message = getErrorMessage(err);
/* __GDPR__
"galleryService:requestError" : {
"url" : { "endPoint": "none", "classification": "SystemMetaData", "purpose": "FeatureInsight" },
"cdn": { "endPoint": "none", "classification": "SystemMetaData", "purpose": "FeatureInsight" },
"message": { "endPoint": "none", "classification": "SystemMetaData", "purpose": "FeatureInsight" }
}
*/
this.telemetryService.publicLog('galleryService:requestError', { url, cdn: true, message });
/* __GDPR__
"galleryService:cdnFallback" : {
"url" : { "endPoint": "none", "classification": "SystemMetaData", "purpose": "FeatureInsight" },
"message": { "endPoint": "none", "classification": "SystemMetaData", "purpose": "FeatureInsight" }
}
*/
this.telemetryService.publicLog('galleryService:cdnFallback', { url, message });
const fallbackOptions = assign({}, options, { url: fallbackUrl });
......@@ -576,6 +610,13 @@ export class ExtensionGalleryService implements IExtensionGalleryService {
}
const message = getErrorMessage(err);
/* __GDPR__
"galleryService:requestError" : {
"url" : { "endPoint": "none", "classification": "SystemMetaData", "purpose": "FeatureInsight" },
"cdn": { "endPoint": "none", "classification": "SystemMetaData", "purpose": "FeatureInsight" },
"message": { "endPoint": "none", "classification": "SystemMetaData", "purpose": "FeatureInsight" }
}
*/
this.telemetryService.publicLog('galleryService:requestError', { url: fallbackUrl, cdn: false, message });
return TPromise.wrapError<IRequestContext>(err);
});
......
......@@ -30,6 +30,11 @@ export class OpenerService implements IOpenerService {
open(resource: URI, options?: { openToSide?: boolean }): TPromise<any> {
/* __GDPR__
"openerService" : {
"scheme" : { "endPoint": "none", "classification": "SystemMetaData", "purpose": "FeatureInsight" }
}
*/
this._telemetryService.publicLog('openerService', { scheme: resource.scheme });
const { scheme, path, query, fragment } = resource;
......
......@@ -143,6 +143,16 @@ export default class ErrorTelemetry {
private _flushBuffer(): void {
for (let error of this._buffer) {
/* __GDPR__
"UnhandledError" : {
"message" : { "endPoint": "none", "classification": "SystemMetaData", "purpose": "PerformanceAndHealth" },
"name": { "endPoint": "none", "classification": "SystemMetaData", "purpose": "PerformanceAndHealth" },
"stack": { "endPoint": "none", "classification": "SystemMetaData", "purpose": "PerformanceAndHealth" },
"id": { "endPoint": "none", "classification": "SystemMetaData", "purpose": "PerformanceAndHealth" },
"line": { "endPoint": "none", "classification": "SystemMetaData", "purpose": "PerformanceAndHealth" },
"column": { "endPoint": "none", "classification": "SystemMetaData", "purpose": "PerformanceAndHealth" }
}
*/
this._telemetryService.publicLog('UnhandledError', error);
}
this._buffer.length = 0;
......
......@@ -180,10 +180,22 @@ const configurationValueWhitelist = [
export function configurationTelemetry(telemetryService: ITelemetryService, configurationService: IConfigurationService): IDisposable {
return configurationService.onDidUpdateConfiguration(event => {
if (event.source !== ConfigurationSource.Default) {
/* __GDPR__
"updateConfiguration" : {
"configurationSource" : { "endPoint": "none", "classification": "SystemMetaData", "purpose": "FeatureInsight" },
"configurationKeys": { "endPoint": "none", "classification": "SystemMetaData", "purpose": "FeatureInsight" }
}
*/
telemetryService.publicLog('updateConfiguration', {
configurationSource: ConfigurationSource[event.source],
configurationKeys: flattenKeys(event.sourceConfig)
});
/* __GDPR__
"updateConfigurationValues" : {
"configurationSource" : { "endPoint": "none", "classification": "SystemMetaData", "purpose": "FeatureInsight" },
"configurationValues": { "endPoint": "none", "classification": "CustomerContent", "purpose": "FeatureInsight" }
}
*/
telemetryService.publicLog('updateConfigurationValues', {
configurationSource: ConfigurationSource[event.source],
configurationValues: flattenValues(event.sourceConfig, configurationValueWhitelist)
......@@ -194,6 +206,11 @@ export function configurationTelemetry(telemetryService: ITelemetryService, conf
export function lifecycleTelemetry(telemetryService: ITelemetryService, lifecycleService: ILifecycleService): IDisposable {
return lifecycleService.onShutdown(event => {
/* __GDPR__
"shutdown" : {
"reason" : { "endPoint": "none", "classification": "SystemMetaData", "purpose": "FeatureInsight" }
}
*/
telemetryService.publicLog('shutdown', { reason: ShutdownReason[event] });
});
}
......@@ -201,6 +218,11 @@ export function lifecycleTelemetry(telemetryService: ITelemetryService, lifecycl
export function keybindingsTelemetry(telemetryService: ITelemetryService, keybindingService: IKeybindingService): IDisposable {
return keybindingService.onDidUpdateKeybindings(event => {
if (event.source === KeybindingSource.User && event.keybindings) {
/* __GDPR__
"updateKeybindings" : {
"bindings": { "endPoint": "none", "classification": "CustomerContent", "purpose": "FeatureInsight" }
}
*/
telemetryService.publicLog('updateKeybindings', {
bindings: event.keybindings.map(binding => ({
key: binding.key,
......
......@@ -164,6 +164,11 @@ export class UpdateService implements IUpdateService {
if (!update) {
this._onUpdateNotAvailable.fire(explicit);
this.state = State.Idle;
/* __GDPR__
"update:notAvailable" : {
"explicit" : { "endPoint": "none", "classification": "SystemMetaData", "purpose": "FeatureInsight" }
}
*/
this.telemetryService.publicLog('update:notAvailable', { explicit });
} else if (update.url) {
......@@ -177,6 +182,13 @@ export class UpdateService implements IUpdateService {
this._availableUpdate = data;
this._onUpdateAvailable.fire({ url: update.url, version: update.version });
this.state = State.UpdateAvailable;
/* __GDPR__
"update:available" : {
"explicit" : { "endPoint": "none", "classification": "SystemMetaData", "purpose": "FeatureInsight" },
"version": { "endPoint": "none", "classification": "SystemMetaData", "purpose": "FeatureInsight" },
"currentVersion": { "endPoint": "none", "classification": "SystemMetaData", "purpose": "FeatureInsight" }
}
*/
this.telemetryService.publicLog('update:available', { explicit, version: update.version, currentVersion: product.commit });
} else {
......@@ -189,6 +201,11 @@ export class UpdateService implements IUpdateService {
this._availableUpdate = data;
this._onUpdateReady.fire(data);
this.state = State.UpdateDownloaded;
/* __GDPR__
"update:downloaded" : {
"version" : { "endPoint": "none", "classification": "SystemMetaData", "purpose": "FeatureInsight" }
}
*/
this.telemetryService.publicLog('update:downloaded', { version: update.version });
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册