src/vs/platform/telemetry/common/telemetryService.ts/TelemetryService/_anonymizeFilePaths
class TelemetryService:	private _anonymizeFilePaths(stack: string): string {
		let updatedStack = stack;

		const cleanUpIndexes: [number, number][] = [];
		for (const regexp of this._cleanupPatterns) {
			while (true) {
				const result = regexp.exec(stack);
				if (!result) {
					break;
				}
				cleanUpIndexes.push([result.index, regexp.lastIndex]);
			}
		}

		const nodeModulesRegex = /^[\\\/]?(node_modules|node_modules\.asar)[\\\/]/;
		const fileRegex = /(file:\/\/)?([a-zA-Z]:(\\\\|\\|\/)|(\\\\|\\|\/))?([\w-\._]+(\\\\|\\|\/))+[\w-\._]*/g;
		let lastIndex = 0;
		updatedStack = '';

		while (true) {
			const result = fileRegex.exec(stack);
			if (!result) {
				break;
			}
			// Anoynimize user file paths that do not need to be retained or cleaned up.
			if (!nodeModulesRegex.test(result[0]) && cleanUpIndexes.every(([x, y]) => result.index < x || result.index >= y)) {
				updatedStack += stack.substring(lastIndex, result.index) + '<REDACTED: user-file-path>';
				lastIndex = fileRegex.lastIndex;
			}
		}
		if (lastIndex < stack.length) {
			updatedStack += stack.substr(lastIndex);
		}

		return updatedStack;
	}