Skip to content

Commit e98fd12

Browse files
authored
Fixes empty configuration telemetry (microsoft#176389)
Fix empty config key array (microsoft#175678)
1 parent 92da948 commit e98fd12

File tree

1 file changed

+1
-19
lines changed

1 file changed

+1
-19
lines changed

src/vs/platform/telemetry/common/telemetryUtils.ts

Lines changed: 1 addition & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ export function configurationTelemetry(telemetryService: ITelemetryService, conf
115115
};
116116
telemetryService.publicLog2<UpdateConfigurationEvent, UpdateConfigurationClassification>('updateConfiguration', {
117117
configurationSource: ConfigurationTargetToString(event.source),
118-
configurationKeys: flattenKeys(event.affectedKeys)
118+
configurationKeys: Array.from(event.affectedKeys)
119119
});
120120
}
121121
});
@@ -276,24 +276,6 @@ function flatten(obj: any, result: { [key: string]: any }, order: number = 0, pr
276276
}
277277
}
278278

279-
function flattenKeys(value: Object | undefined): string[] {
280-
if (!value) {
281-
return [];
282-
}
283-
const result: string[] = [];
284-
flatKeys(result, '', value);
285-
return result;
286-
}
287-
288-
function flatKeys(result: string[], prefix: string, value: { [key: string]: any } | undefined): void {
289-
if (value && typeof value === 'object' && !Array.isArray(value)) {
290-
Object.keys(value)
291-
.forEach(key => flatKeys(result, prefix ? `${prefix}.${key}` : key, value[key]));
292-
} else {
293-
result.push(prefix);
294-
}
295-
}
296-
297279
/**
298280
* Whether or not this is an internal user
299281
* @param productService The product service

0 commit comments

Comments
 (0)