Skip to content

Commit 58bf196

Browse files
committed
update telemetry
1 parent 40b5b5d commit 58bf196

2 files changed

Lines changed: 21 additions & 20 deletions

File tree

src/vs/workbench/contrib/markers/browser/markersPanel.ts

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -440,6 +440,7 @@ export class MarkersPanel extends Panel implements IMarkerFilterController {
440440
}));
441441
this._register(this.tree.onDidChangeSelection(() => this.onSelected()));
442442
this._register(this.filterAction.onDidChange((event: IMarkersFilterActionChangeEvent) => {
443+
this.reportFilteringUsed();
443444
if (event.activeFile) {
444445
this.refreshPanel();
445446
} else if (event.filterText || event.excludedFiles || event.showWarnings || event.showErrors || event.showInfos) {
@@ -753,6 +754,26 @@ export class MarkersPanel extends Panel implements IMarkerFilterController {
753754
return { source, code };
754755
}
755756

757+
private reportFilteringUsed(): void {
758+
const data = {
759+
errors: this.filterAction.showErrors,
760+
warnings: this.filterAction.showWarnings,
761+
infos: this.filterAction.showInfos,
762+
activeFile: this.filterAction.activeFile,
763+
excludedFiles: this.filterAction.excludedFiles,
764+
};
765+
/* __GDPR__
766+
"problems.filter" : {
767+
"errors" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true },
768+
"warnings": { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true },
769+
"infos": { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true },
770+
"activeFile": { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true },
771+
"excludedFiles": { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true }
772+
}
773+
*/
774+
this.telemetryService.publicLog('problems.filter', data);
775+
}
776+
756777
protected saveState(): void {
757778
this.panelState['filter'] = this.filterAction.filterText;
758779
this.panelState['filterHistory'] = this.filterAction.filterHistory;

src/vs/workbench/contrib/markers/browser/markersPanelActions.ts

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ import { Marker } from 'vs/workbench/contrib/markers/browser/markersModel';
2727
import { IContextKey, IContextKeyService } from 'vs/platform/contextkey/common/contextkey';
2828
import { Event, Emitter } from 'vs/base/common/event';
2929
import { FilterOptions } from 'vs/workbench/contrib/markers/browser/markersFilterOptions';
30-
import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry';
3130
import { DropdownMenuActionViewItem } from 'vs/base/browser/ui/dropdown/dropdown';
3231
import { AnchorAlignment } from 'vs/base/browser/ui/contextview/contextview';
3332

@@ -285,7 +284,6 @@ export class MarkersFilterActionViewItem extends BaseActionViewItem {
285284
@IInstantiationService private readonly instantiationService: IInstantiationService,
286285
@IContextViewService private readonly contextViewService: IContextViewService,
287286
@IThemeService private readonly themeService: IThemeService,
288-
@ITelemetryService private readonly telemetryService: ITelemetryService,
289287
@IContextKeyService contextKeyService: IContextKeyService
290288
) {
291289
super(null, action);
@@ -385,7 +383,6 @@ export class MarkersFilterActionViewItem extends BaseActionViewItem {
385383
inputbox.addToHistory();
386384
this.action.filterText = inputbox.value;
387385
this.action.filterHistory = inputbox.getHistory();
388-
this.reportFilteringUsed();
389386
}
390387

391388
private updateBadge(): void {
@@ -426,23 +423,6 @@ export class MarkersFilterActionViewItem extends BaseActionViewItem {
426423
}
427424
}
428425

429-
private reportFilteringUsed(): void {
430-
const filterOptions = this.filterController.getFilterOptions();
431-
const data = {
432-
errors: filterOptions.showErrors,
433-
warnings: filterOptions.showWarnings,
434-
infos: filterOptions.showInfos,
435-
};
436-
/* __GDPR__
437-
"problems.filter" : {
438-
"errors" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true },
439-
"warnings": { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true },
440-
"infos": { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true }
441-
}
442-
*/
443-
this.telemetryService.publicLog('problems.filter', data);
444-
}
445-
446426
protected updateClass(): void {
447427
if (this.element && this.container) {
448428
this.element.className = this.action.class || '';

0 commit comments

Comments
 (0)