[Telemetry Schema Validation] Allow null on string (#163499)

This commit is contained in:
Alejandro Fernández Haro 2023-08-10 17:27:30 +02:00 committed by GitHub
parent 1d9f76bc56
commit 263c534429
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -59,7 +59,8 @@ function valueSchemaToConfigSchema(value: TelemetrySchemaValue): Type<unknown> {
case 'keyword':
case 'text':
case 'date':
return schema.string();
// Some plugins return `null` when there is no value to report
return schema.oneOf([schema.string(), schema.literal(null)]);
case 'byte':
case 'double':
case 'float':