File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
src/vs/workbench/contrib/telemetry/browser Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -281,12 +281,12 @@ class ConfigurationTelemetryContribution extends Disposable implements IWorkbenc
281
281
/**
282
282
* Report value of a setting only if it is an enum, boolean, or number or an array of those.
283
283
*/
284
- private getValueToReport ( key : string , target : ConfigurationTarget . USER_LOCAL | ConfigurationTarget . WORKSPACE ) : any {
284
+ private getValueToReport ( key : string , target : ConfigurationTarget . USER_LOCAL | ConfigurationTarget . WORKSPACE ) : string | undefined {
285
285
const schema = this . configurationRegistry . getConfigurationProperties ( ) [ key ] ;
286
286
const inpsectData = this . configurationService . inspect ( key ) ;
287
287
const value = target === ConfigurationTarget . USER_LOCAL ? inpsectData . user ?. value : inpsectData . workspace ?. value ;
288
288
if ( isNumber ( value ) || isBoolean ( value ) ) {
289
- return value ;
289
+ return value . toString ( ) ;
290
290
}
291
291
if ( isString ( value ) ) {
292
292
if ( schema ?. enum ?. includes ( value ) ) {
@@ -296,15 +296,15 @@ class ConfigurationTelemetryContribution extends Disposable implements IWorkbenc
296
296
}
297
297
if ( Array . isArray ( value ) ) {
298
298
if ( value . every ( v => isNumber ( v ) || isBoolean ( v ) || ( isString ( v ) && schema ?. enum ?. includes ( v ) ) ) ) {
299
- return value ;
299
+ return JSON . stringify ( value ) ;
300
300
}
301
301
}
302
302
return undefined ;
303
303
}
304
304
305
305
private reportTelemetry ( key : string , target : ConfigurationTarget . USER_LOCAL | ConfigurationTarget . WORKSPACE ) : void {
306
306
type UpdatedSettingEvent = {
307
- value : any ;
307
+ value : string | undefined ;
308
308
source : string ;
309
309
} ;
310
310
const source = ConfigurationTargetToString ( target ) ;
You can’t perform that action at this time.
0 commit comments