src/vs/platform/profiling/common/profilingTelemetrySpec.ts/reportSample
export function reportSample(data: SampleData, telemetryService: ITelemetryService, logService: ILogService): void {

	const { sample, perfBaseline, source } = data;

	// log a fake error with a clearer stack
	const fakeError = new Error(`[PerfSampleError]|${sample.selfTime}ms`);
	fakeError.name = 'PerfSampleError';
	fakeError.stack = `${fakeError.message} by ${data.source} in ${sample.location}\n` + sample.caller.map(c => `\t at ${c.location} (${c.percentage}%)`).join('\n');
	logService.error(fakeError);

	// send telemetry event
	telemetryService.publicLog2<TelemetrySampleData, TelemetrySampleDataClassification>(`unresponsive.sample`, {
		perfBaseline,
		selfTime: sample.selfTime,
		totalTime: sample.totalTime,
		percentage: sample.percentage,
		functionName: sample.location,
		callers: sample.caller.map(c => c.location).join('<'),
		callersAnnotated: sample.caller.map(c => `${c.percentage}|${c.location}`).join('<'),
		source
	});

}