From 052c3871a9bf05c3b338f70c88aba26d98d6c4be Mon Sep 17 00:00:00 2001 From: jack-berg <34418638+jack-berg@users.noreply.github.com> Date: Mon, 28 Oct 2024 12:41:16 -0500 Subject: [PATCH] Don't require empty objects (#134) Co-authored-by: Alex Boten <223565+codeboten@users.noreply.github.com> --- examples/kitchen-sink.yaml | 19 ++++++++++--------- examples/sdk-config.yaml | 11 ++++++----- examples/sdk-migration-config.yaml | 11 ++++++----- schema/meter_provider.json | 4 ++-- 4 files changed, 24 insertions(+), 21 deletions(-) diff --git a/examples/kitchen-sink.yaml b/examples/kitchen-sink.yaml index d9e56f0..b4c73f3 100644 --- a/examples/kitchen-sink.yaml +++ b/examples/kitchen-sink.yaml @@ -64,7 +64,7 @@ logger_provider: # Configure exporter. exporter: # Configure exporter to be console. - console: {} + console: # Configure log record limits. See also attribute_limits. limits: # Configure max attribute value size. Overrides .attribute_limits.attribute_value_length_limit. @@ -109,7 +109,7 @@ meter_provider: # Configure metric producers. producers: - # Configure metric producer to be opencensus. - opencensus: {} + opencensus: - # Configure a periodic metric reader. periodic: # Configure delay interval (in milliseconds) between start of two consecutive exports. @@ -150,13 +150,13 @@ meter_provider: # Configure metric producers. producers: - # Configure metric producer to be prometheus. - prometheus: {} + prometheus: - # Configure a periodic metric reader. periodic: # Configure exporter. exporter: # Configure exporter to be console. - console: {} + console: # Configure views. Each view has a selector which determines the instrument(s) it applies to, and a configuration for the resulting stream(s). views: - # Configure view selector. @@ -277,7 +277,7 @@ tracer_provider: # Configure exporter. exporter: # Configure exporter to be console. - console: {} + console: # Configure span limits. See also attribute_limits. limits: # Configure max attribute value size. Overrides .attribute_limits.attribute_value_length_limit. @@ -305,19 +305,20 @@ tracer_provider: # Configure remote_parent_sampled sampler. remote_parent_sampled: # Configure sampler to be always_on. - always_on: {} + always_on: # Configure remote_parent_not_sampled sampler. remote_parent_not_sampled: # Configure sampler to be always_off. - always_off: {} + always_off: # Configure local_parent_sampled sampler. local_parent_sampled: # Configure sampler to be always_on. - always_on: {} + always_on: # Configure local_parent_not_sampled sampler. local_parent_not_sampled: # Configure sampler to be always_off. - always_off: {} + always_off: + # Configure resource for all signals. resource: diff --git a/examples/sdk-config.yaml b/examples/sdk-config.yaml index 57390d6..df40a11 100644 --- a/examples/sdk-config.yaml +++ b/examples/sdk-config.yaml @@ -87,23 +87,24 @@ tracer_provider: # Configure root sampler. root: # Configure sampler to be always_on. - always_on: {} + always_on: # Configure remote_parent_sampled sampler. remote_parent_sampled: # Configure sampler to be always_on. - always_on: {} + always_on: # Configure remote_parent_not_sampled sampler. remote_parent_not_sampled: # Configure sampler to be always_off. - always_off: {} + always_off: # Configure local_parent_sampled sampler. local_parent_sampled: # Configure sampler to be always_on. - always_on: {} + always_on: # Configure local_parent_not_sampled sampler. local_parent_not_sampled: # Configure sampler to be always_off. - always_off: {} + always_off: + # Configure meter provider. meter_provider: diff --git a/examples/sdk-migration-config.yaml b/examples/sdk-migration-config.yaml index 3a29edb..f1d698a 100644 --- a/examples/sdk-migration-config.yaml +++ b/examples/sdk-migration-config.yaml @@ -121,23 +121,24 @@ tracer_provider: # Configure root sampler. root: # Configure sampler to be always_on. - always_on: {} + always_on: # Configure remote_parent_sampled sampler. remote_parent_sampled: # Configure sampler to be always_on. - always_on: {} + always_on: # Configure remote_parent_not_sampled sampler. remote_parent_not_sampled: # Configure sampler to be always_off. - always_off: {} + always_off: # Configure local_parent_sampled sampler. local_parent_sampled: # Configure sampler to be always_on. - always_on: {} + always_on: # Configure local_parent_not_sampled sampler. local_parent_not_sampled: # Configure sampler to be always_off. - always_off: {} + always_off: + # Configure meter provider. meter_provider: diff --git a/schema/meter_provider.json b/schema/meter_provider.json index 7a2d288..1412123 100644 --- a/schema/meter_provider.json +++ b/schema/meter_provider.json @@ -103,13 +103,13 @@ "maxProperties": 1, "properties": { "opencensus": { - "type": "object", + "type": ["object", "null"], "additionalProperties": false } }, "patternProperties": { ".*": { - "type": "object" + "type": ["object", "null"] } } },