src/vs/workbench/contrib/format/browser/formatActionsMultiple.ts/logFormatterTelemetry
function logFormatterTelemetry<T extends { extensionId?: ExtensionIdentifier }>(telemetryService: ITelemetryService, mode: 'document' | 'range', options: T[], pick?: T) {
	type FormatterPicks = {
		mode: 'document' | 'range';
		extensions: string[];
		pick: string;
	};
	type FormatterPicksClassification = {
		owner: 'jrieken';
		comment: 'Information about resolving formatter conflicts';
		mode: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; comment: 'Formatting mode: whole document or a range/selection' };
		extensions: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; comment: 'The extension that got picked' };
		pick: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; comment: 'The possible extensions to pick' };
	};
	function extKey(obj: T): string {
		return obj.extensionId ? ExtensionIdentifier.toKey(obj.extensionId) : 'unknown';
	}
	telemetryService.publicLog2<FormatterPicks, FormatterPicksClassification>('formatterpick', {
		mode,
		extensions: options.map(extKey),
		pick: pick ? extKey(pick) : 'none'
	});
}