Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 1 addition & 19 deletions src/vs/platform/telemetry/common/telemetryUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ export function configurationTelemetry(telemetryService: ITelemetryService, conf
};
telemetryService.publicLog2<UpdateConfigurationEvent, UpdateConfigurationClassification>('updateConfiguration', {
configurationSource: ConfigurationTargetToString(event.source),
configurationKeys: flattenKeys(event.affectedKeys)
configurationKeys: Array.from(event.affectedKeys)
});
}
});
Expand Down Expand Up @@ -276,24 +276,6 @@ function flatten(obj: any, result: { [key: string]: any }, order: number = 0, pr
}
}

function flattenKeys(value: Object | undefined): string[] {
if (!value) {
return [];
}
const result: string[] = [];
flatKeys(result, '', value);
return result;
}

function flatKeys(result: string[], prefix: string, value: { [key: string]: any } | undefined): void {
if (value && typeof value === 'object' && !Array.isArray(value)) {
Object.keys(value)
.forEach(key => flatKeys(result, prefix ? `${prefix}.${key}` : key, value[key]));
} else {
result.push(prefix);
}
}

/**
* Whether or not this is an internal user
* @param productService The product service
Expand Down