diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 14e2d528..36f145cb 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -192,6 +192,14 @@ Another example: `oneOf` is used to specify that the `value` property matches the [Attribute AnyValue](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/common/README.md#anyvalue) definition, and is either a primitive or array of primitives. This type of use is acceptable but should be used judiciously. +### Array minItems + +Because properties of type `array` are not candidates for [env var substitution], it typically does not make sense to allow the array to be empty. In some cases, an empty array likely corresponds to an accidental misconfiguration which should be detected and reported as an error. In other cases, an empty array is simply meaningless and the user is better off omitting the property altogether. + +For these reasons, [`minItems`](https://json-schema.org/understanding-json-schema/reference/array#length) is typically set to `1`. + +NOTE: there are some valid cases where an empty array is semantically meaningful, such as when setting `ExplicitBucketHistogram.boundaries`. + ### Annotations - title and description The JSON schema [`title` and `description` annotations](https://json-schema.org/understanding-json-schema/reference/annotations) are keywords which are not involved in validation. Instead, they act as a mechanism to help schemas be self-documenting, and may be used by code generation tools. diff --git a/examples/sdk-config.yaml b/examples/sdk-config.yaml index 64ae6348..5c575189 100644 --- a/examples/sdk-config.yaml +++ b/examples/sdk-config.yaml @@ -96,9 +96,6 @@ tracer_provider: # Value must be non-negative. A value of 0 indicates no limit (infinity). # If omitted or null, 10000 is used. timeout: 10000 - # Configure headers. Entries have higher priority than entries from .headers_list. - # If an entry's .value is null, the entry is ignored. - headers: [] # Configure span limits. See also attribute_limits. limits: # Configure max attribute value size. Overrides .attribute_limits.attribute_value_length_limit. @@ -199,9 +196,6 @@ meter_provider: # Value must be non-negative. A value of 0 indicates no limit (infinity). # If omitted or null, 10000 is used. timeout: 10000 - # Configure headers. Entries have higher priority than entries from .headers_list. - # If an entry's .value is null, the entry is ignored. - headers: [] # Configure temporality preference. # Values include: cumulative, delta, low_memory. For behavior of values, see https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/metrics/sdk_exporters/otlp.md. # If omitted or null, cumulative is used. @@ -264,9 +258,6 @@ logger_provider: # Value must be non-negative. A value of 0 indicates no limit (infinity). # If omitted or null, 10000 is used. timeout: 10000 - # Configure headers. Entries have higher priority than entries from .headers_list. - # If an entry's .value is null, the entry is ignored. - headers: [] # Configure log record limits. See also attribute_limits. limits: # Configure max attribute value size. Overrides .attribute_limits.attribute_value_length_limit. diff --git a/examples/sdk-migration-config.yaml b/examples/sdk-migration-config.yaml index 5191b12b..830ccc8b 100644 --- a/examples/sdk-migration-config.yaml +++ b/examples/sdk-migration-config.yaml @@ -69,10 +69,6 @@ attribute_limits: # Configure text map context propagators. # If omitted, a noop propagator is used. propagator: - # Configure the propagators in the composite text map propagator. Entries from .composite_list are appended to the list here with duplicates filtered out. - # Built-in propagator keys include: tracecontext, baggage, b3, b3multi, jaeger, ottrace. Known third party keys include: xray. - # If the resolved list of propagators (from .composite and .composite_list) is empty, a noop propagator is used. - composite: [] # Configure the propagators in the composite text map propagator. Entries are appended to .composite with duplicates filtered out. # The value is a comma separated list of propagator identifiers matching the format of OTEL_PROPAGATORS. See https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/configuration/sdk-environment-variables.md#general-sdk-configuration for details. # Built-in propagator identifiers include: tracecontext, baggage, b3, b3multi, jaeger, ottrace. Known third party identifiers include: xray. @@ -128,9 +124,6 @@ tracer_provider: # Value must be non-negative. A value of 0 indicates no limit (infinity). # If omitted or null, 10000 is used. timeout: ${OTEL_EXPORTER_OTLP_TRACES_TIMEOUT:-10000} - # Configure headers. Entries have higher priority than entries from .headers_list. - # If an entry's .value is null, the entry is ignored. - headers: [] # Configure headers. Entries have lower priority than entries from .headers. # The value is a list of comma separated key-value pairs matching the format of OTEL_EXPORTER_OTLP_HEADERS. See https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/protocol/exporter.md#configuration-options for details. # If omitted or null, no headers are added. @@ -237,9 +230,6 @@ meter_provider: # Value must be non-negative. A value of 0 indicates no limit (infinity). # If omitted or null, 10000 is used. timeout: ${OTEL_EXPORTER_OTLP_METRICS_TIMEOUT:-10000} - # Configure headers. Entries have higher priority than entries from .headers_list. - # If an entry's .value is null, the entry is ignored. - headers: [] # Configure headers. Entries have lower priority than entries from .headers. # The value is a list of comma separated key-value pairs matching the format of OTEL_EXPORTER_OTLP_HEADERS. See https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/protocol/exporter.md#configuration-options for details. # If omitted or null, no headers are added. @@ -306,9 +296,6 @@ logger_provider: # Value must be non-negative. A value of 0 indicates no limit (infinity). # If omitted or null, 10000 is used. timeout: ${OTEL_EXPORTER_OTLP_LOGS_TIMEOUT:-10000} - # Configure headers. Entries have higher priority than entries from .headers_list. - # If an entry's .value is null, the entry is ignored. - headers: [] # Configure headers. Entries have lower priority than entries from .headers. # The value is a list of comma separated key-value pairs matching the format of OTEL_EXPORTER_OTLP_HEADERS. See https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/protocol/exporter.md#configuration-options for details. # If omitted or null, no headers are added. diff --git a/schema-docs.md b/schema-docs.md index 5a8aed65..94ed6fd8 100644 --- a/schema-docs.md +++ b/schema-docs.md @@ -233,19 +233,22 @@ Usages: "type": "array", "items": { "type": "string" - } + }, + "minItems": 1 }, { "type": "array", "items": { "type": "boolean" - } + }, + "minItems": 1 }, { "type": "array", "items": { "type": "number" - } + }, + "minItems": 1 } ] }, @@ -1222,7 +1225,7 @@ Usages: | Property | Type | Required? | Constraints | Description | |---|---|---|---|---| -| `request_captured_headers` | `array` of `string` | `false` | No constraints. | Configure headers to capture for outbound http requests.
| +| `request_captured_headers` | `array` of `string` | `false` | * `minItems`: `1`
| Configure headers to capture for outbound http requests.
| | `response_captured_headers` | `array` of `string` | `false` | No constraints. | Configure headers to capture for inbound http responses.
|
@@ -1252,6 +1255,7 @@ Usages: "properties": { "request_captured_headers": { "type": "array", + "minItems": 1, "items": { "type": "string" } @@ -1318,8 +1322,8 @@ Usages: | Property | Type | Required? | Constraints | Description | |---|---|---|---|---| -| `request_captured_headers` | `array` of `string` | `false` | No constraints. | Configure headers to capture for inbound http requests.
| -| `response_captured_headers` | `array` of `string` | `false` | No constraints. | Configure headers to capture for outbound http responses.
| +| `request_captured_headers` | `array` of `string` | `false` | * `minItems`: `1`
| Configure headers to capture for inbound http requests.
| +| `response_captured_headers` | `array` of `string` | `false` | * `minItems`: `1`
| Configure headers to capture for outbound http responses.
|
Language support status @@ -1348,12 +1352,14 @@ Usages: "properties": { "request_captured_headers": { "type": "array", + "minItems": 1, "items": { "type": "string" } }, "response_captured_headers": { "type": "array", + "minItems": 1, "items": { "type": "string" } @@ -1475,6 +1481,7 @@ Usages: "properties": { "service_mapping": { "type": "array", + "minItems": 1, "items": { "$ref": "#/$defs/ExperimentalPeerServiceMapping" } @@ -1503,6 +1510,7 @@ Usages: "properties": { "request_captured_headers": { "type": "array", + "minItems": 1, "items": { "type": "string" } @@ -1521,12 +1529,14 @@ Usages: "properties": { "request_captured_headers": { "type": "array", + "minItems": 1, "items": { "type": "string" } }, "response_captured_headers": { "type": "array", + "minItems": 1, "items": { "type": "string" } @@ -1719,7 +1729,7 @@ Usages: | Property | Type | Required? | Constraints | Description | |---|---|---|---|---| | `default_config` | [`ExperimentalLoggerConfig`](#experimentalloggerconfig) | `false` | No constraints. | Configure the default logger config used there is no matching entry in .logger_configurator/development.loggers. | -| `loggers` | `array` of [`ExperimentalLoggerMatcherAndConfig`](#experimentalloggermatcherandconfig) | `false` | No constraints. | Configure loggers. | +| `loggers` | `array` of [`ExperimentalLoggerMatcherAndConfig`](#experimentalloggermatcherandconfig) | `false` | * `minItems`: `1`
| Configure loggers. |
Language support status @@ -1753,6 +1763,7 @@ Usages: }, "loggers": { "type": "array", + "minItems": 1, "items": { "$ref": "#/$defs/ExperimentalLoggerMatcherAndConfig" } @@ -1863,7 +1874,7 @@ Usages: | Property | Type | Required? | Constraints | Description | |---|---|---|---|---| | `default_config` | [`ExperimentalMeterConfig`](#experimentalmeterconfig) | `false` | No constraints. | Configure the default meter config used there is no matching entry in .meter_configurator/development.meters. | -| `meters` | `array` of [`ExperimentalMeterMatcherAndConfig`](#experimentalmetermatcherandconfig) | `false` | No constraints. | Configure meters. | +| `meters` | `array` of [`ExperimentalMeterMatcherAndConfig`](#experimentalmetermatcherandconfig) | `false` | * `minItems`: `1`
| Configure meters. |
Language support status @@ -1897,6 +1908,7 @@ Usages: }, "meters": { "type": "array", + "minItems": 1, "items": { "$ref": "#/$defs/ExperimentalMeterMatcherAndConfig" } @@ -2064,7 +2076,7 @@ Usages: | Property | Type | Required? | Constraints | Description | |---|---|---|---|---| -| `service_mapping` | `array` of [`ExperimentalPeerServiceMapping`](#experimentalpeerservicemapping) | `false` | No constraints. | Configure the service mapping for instrumentations following peer.service semantic conventions.
See peer.service semantic conventions: https://opentelemetry.io/docs/specs/semconv/general/attributes/#general-remote-service-attributes
| +| `service_mapping` | `array` of [`ExperimentalPeerServiceMapping`](#experimentalpeerservicemapping) | `false` | * `minItems`: `1`
| Configure the service mapping for instrumentations following peer.service semantic conventions.
See peer.service semantic conventions: https://opentelemetry.io/docs/specs/semconv/general/attributes/#general-remote-service-attributes
|
Language support status @@ -2092,6 +2104,7 @@ Usages: "properties": { "service_mapping": { "type": "array", + "minItems": 1, "items": { "$ref": "#/$defs/ExperimentalPeerServiceMapping" } @@ -2315,7 +2328,7 @@ Usages: | Property | Type | Required? | Constraints | Description | |---|---|---|---|---| | `attributes` | [`IncludeExclude`](#includeexclude) | `false` | No constraints. | Configure attributes provided by resource detectors. | -| `detectors` | `array` of [`ExperimentalResourceDetector`](#experimentalresourcedetector) | `false` | No constraints. | Configure resource detectors.
Resource detector names are dependent on the SDK language ecosystem. Please consult documentation for each respective language.
If omitted or null, no resource detectors are enabled.
| +| `detectors` | `array` of [`ExperimentalResourceDetector`](#experimentalresourcedetector) | `false` | * `minItems`: `1`
| Configure resource detectors.
Resource detector names are dependent on the SDK language ecosystem. Please consult documentation for each respective language.
If omitted or null, no resource detectors are enabled.
|
Language support status @@ -2347,6 +2360,7 @@ Usages: }, "detectors": { "type": "array", + "minItems": 1, "items": { "$ref": "#/$defs/ExperimentalResourceDetector" } @@ -2611,7 +2625,7 @@ Usages: | Property | Type | Required? | Constraints | Description | |---|---|---|---|---| | `default_config` | [`ExperimentalTracerConfig`](#experimentaltracerconfig) | `false` | No constraints. | Configure the default tracer config used there is no matching entry in .tracer_configurator/development.tracers. | -| `tracers` | `array` of [`ExperimentalTracerMatcherAndConfig`](#experimentaltracermatcherandconfig) | `false` | No constraints. | Configure tracers. | +| `tracers` | `array` of [`ExperimentalTracerMatcherAndConfig`](#experimentaltracermatcherandconfig) | `false` | * `minItems`: `1`
| Configure tracers. |
Language support status @@ -2645,6 +2659,7 @@ Usages: }, "tracers": { "type": "array", + "minItems": 1, "items": { "$ref": "#/$defs/ExperimentalTracerMatcherAndConfig" } @@ -2706,7 +2721,7 @@ Usages: | Property | Type | Required? | Constraints | Description | |---|---|---|---|---| -| `boundaries` | `array` of `number` | `false` | No constraints. | Configure bucket boundaries.
If omitted, [0, 5, 10, 25, 50, 75, 100, 250, 500, 750, 1000, 2500, 5000, 7500, 10000] is used.
| +| `boundaries` | `array` of `number` | `false` | * `minItems`: `0`
| Configure bucket boundaries.
If omitted, [0, 5, 10, 25, 50, 75, 100, 250, 500, 750, 1000, 2500, 5000, 7500, 10000] is used.
| | `record_min_max` | one of:
* `boolean`
* `null`
| `false` | No constraints. | Configure record min and max.
If omitted or null, true is used.
|
@@ -2739,6 +2754,7 @@ Usages: "properties": { "boundaries": { "type": "array", + "minItems": 0, "items": { "type": "number" } @@ -2974,8 +2990,8 @@ Usages: | Property | Type | Required? | Constraints | Description | |---|---|---|---|---| -| `excluded` | `array` of `string` | `false` | No constraints. | Configure list of value patterns to exclude. Applies after .included (i.e. excluded has higher priority than included).
Values are evaluated to match as follows:
* If the value exactly matches.
* If the value matches the wildcard pattern, where '?' matches any single character and '*' matches any number of characters including none.
If omitted, .included attributes are included.
| -| `included` | `array` of `string` | `false` | No constraints. | Configure list of value patterns to include.
Values are evaluated to match as follows:
* If the value exactly matches.
* If the value matches the wildcard pattern, where '?' matches any single character and '*' matches any number of characters including none.
If omitted, all values are included.
| +| `excluded` | `array` of `string` | `false` | * `minItems`: `1`
| Configure list of value patterns to exclude. Applies after .included (i.e. excluded has higher priority than included).
Values are evaluated to match as follows:
* If the value exactly matches.
* If the value matches the wildcard pattern, where '?' matches any single character and '*' matches any number of characters including none.
If omitted, .included attributes are included.
| +| `included` | `array` of `string` | `false` | * `minItems`: `1`
| Configure list of value patterns to include.
Values are evaluated to match as follows:
* If the value exactly matches.
* If the value matches the wildcard pattern, where '?' matches any single character and '*' matches any number of characters including none.
If omitted, all values are included.
|
Language support status @@ -3006,12 +3022,14 @@ Usages: "properties": { "included": { "type": "array", + "minItems": 1, "items": { "type": "string" } }, "excluded": { "type": "array", + "minItems": 1, "items": { "type": "string" } @@ -3307,6 +3325,7 @@ Usages: }, "loggers": { "type": "array", + "minItems": 1, "items": { "$ref": "#/$defs/ExperimentalLoggerMatcherAndConfig" } @@ -3562,7 +3581,7 @@ Usages: | `exemplar_filter` | [`ExemplarFilter`](#exemplarfilter) | `false` | No constraints. | Configure the exemplar filter.
Values include: trace_based, always_on, always_off. For behavior of values see https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/configuration/sdk-environment-variables.md#metrics-sdk-configuration.
If omitted or null, trace_based is used.
| | `meter_configurator/development`
**WARNING:** This property is [experimental](README.md#experimental-features). | [`ExperimentalMeterConfigurator`](#experimentalmeterconfigurator) | `false` | No constraints. | Configure meters.
| | `readers` | `array` of [`MetricReader`](#metricreader) | `true` | * `minItems`: `1`
| Configure metric readers. | -| `views` | `array` of [`View`](#view) | `false` | No constraints. | Configure views.
Each view has a selector which determines the instrument(s) it applies to, and a configuration for the resulting stream(s).
| +| `views` | `array` of [`View`](#view) | `false` | * `minItems`: `1`
| Configure views.
Each view has a selector which determines the instrument(s) it applies to, and a configuration for the resulting stream(s).
|
Language support status @@ -3603,6 +3622,7 @@ Usages: }, "views": { "type": "array", + "minItems": 1, "items": { "$ref": "#/$defs/View" } @@ -3652,6 +3672,7 @@ Usages: }, "producers": { "type": "array", + "minItems": 1, "items": { "$ref": "#/$defs/MetricProducer" } @@ -3673,6 +3694,7 @@ Usages: }, "producers": { "type": "array", + "minItems": 1, "items": { "$ref": "#/$defs/MetricProducer" } @@ -3906,6 +3928,7 @@ Usages: }, "headers": { "type": "array", + "minItems": 1, "items": { "$ref": "common.json#/$defs/NameStringValuePair" } @@ -3958,6 +3981,7 @@ Usages: }, "headers": { "type": "array", + "minItems": 1, "items": { "$ref": "common.json#/$defs/NameStringValuePair" } @@ -4175,6 +4199,7 @@ Usages: "properties": { "boundaries": { "type": "array", + "minItems": 0, "items": { "type": "number" } @@ -4242,6 +4267,7 @@ Usages: }, "meters": { "type": "array", + "minItems": 1, "items": { "$ref": "#/$defs/ExperimentalMeterMatcherAndConfig" } @@ -4618,7 +4644,7 @@ Usages: |---|---|---|---|---| | `compression` | one of:
* `string`
* `null`
| `false` | No constraints. | Configure compression.
Values include: gzip, none. Implementations may support other compression algorithms.
If omitted or null, none is used.
| | `endpoint` | one of:
* `string`
* `null`
| `false` | No constraints. | Configure endpoint.
If omitted or null, http://localhost:4317 is used.
| -| `headers` | `array` of [`NameStringValuePair`](#namestringvaluepair) | `false` | No constraints. | Configure headers. Entries have higher priority than entries from .headers_list.
If an entry's .value is null, the entry is ignored.
| +| `headers` | `array` of [`NameStringValuePair`](#namestringvaluepair) | `false` | * `minItems`: `1`
| Configure headers. Entries have higher priority than entries from .headers_list.
If an entry's .value is null, the entry is ignored.
| | `headers_list` | one of:
* `string`
* `null`
| `false` | No constraints. | Configure headers. Entries have lower priority than entries from .headers.
The value is a list of comma separated key-value pairs matching the format of OTEL_EXPORTER_OTLP_HEADERS. See https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/protocol/exporter.md#configuration-options for details.
If omitted or null, no headers are added.
| | `timeout` | one of:
* `integer`
* `null`
| `false` | * `minimum`: `0`
| Configure max time (in milliseconds) to wait for each export.
Value must be non-negative. A value of 0 indicates no limit (infinity).
If omitted or null, 10000 is used.
| | `tls` | [`GrpcTls`](#grpctls) | `false` | No constraints. | Configure TLS settings for the exporter. | @@ -4667,6 +4693,7 @@ Usages: }, "headers": { "type": "array", + "minItems": 1, "items": { "$ref": "#/$defs/NameStringValuePair" } @@ -4701,7 +4728,7 @@ Usages: | `compression` | one of:
* `string`
* `null`
| `false` | No constraints. | Configure compression.
Values include: gzip, none. Implementations may support other compression algorithms.
If omitted or null, none is used.
| | `default_histogram_aggregation` | [`ExporterDefaultHistogramAggregation`](#exporterdefaulthistogramaggregation) | `false` | No constraints. | Configure default histogram aggregation.
Values include: explicit_bucket_histogram, base2_exponential_bucket_histogram. For behavior of values, see https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/metrics/sdk_exporters/otlp.md.
If omitted or null, explicit_bucket_histogram is used.
| | `endpoint` | one of:
* `string`
* `null`
| `false` | No constraints. | Configure endpoint.
If omitted or null, http://localhost:4317 is used.
| -| `headers` | `array` of [`NameStringValuePair`](#namestringvaluepair) | `false` | No constraints. | Configure headers. Entries have higher priority than entries from .headers_list.
If an entry's .value is null, the entry is ignored.
| +| `headers` | `array` of [`NameStringValuePair`](#namestringvaluepair) | `false` | * `minItems`: `1`
| Configure headers. Entries have higher priority than entries from .headers_list.
If an entry's .value is null, the entry is ignored.
| | `headers_list` | one of:
* `string`
* `null`
| `false` | No constraints. | Configure headers. Entries have lower priority than entries from .headers.
The value is a list of comma separated key-value pairs matching the format of OTEL_EXPORTER_OTLP_HEADERS. See https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/protocol/exporter.md#configuration-options for details.
If omitted or null, no headers are added.
| | `temporality_preference` | [`ExporterTemporalityPreference`](#exportertemporalitypreference) | `false` | No constraints. | Configure temporality preference.
Values include: cumulative, delta, low_memory. For behavior of values, see https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/metrics/sdk_exporters/otlp.md.
If omitted or null, cumulative is used.
| | `timeout` | one of:
* `integer`
* `null`
| `false` | * `minimum`: `0`
| Configure max time (in milliseconds) to wait for each export.
Value must be non-negative. A value of 0 indicates no limit (infinity).
If omitted or null, 10000 is used.
| @@ -4752,6 +4779,7 @@ Usages: }, "headers": { "type": "array", + "minItems": 1, "items": { "$ref": "common.json#/$defs/NameStringValuePair" } @@ -4833,7 +4861,7 @@ Usages: | `compression` | one of:
* `string`
* `null`
| `false` | No constraints. | Configure compression.
Values include: gzip, none. Implementations may support other compression algorithms.
If omitted or null, none is used.
| | `encoding` | [`OtlpHttpEncoding`](#otlphttpencoding) | `false` | No constraints. | Configure the encoding used for messages.
Values include: protobuf, json. Implementations may not support json.
If omitted or null, protobuf is used.
| | `endpoint` | one of:
* `string`
* `null`
| `false` | No constraints. | Configure endpoint, including the signal specific path.
If omitted or null, the http://localhost:4318/v1/{signal} (where signal is 'traces', 'logs', or 'metrics') is used.
| -| `headers` | `array` of [`NameStringValuePair`](#namestringvaluepair) | `false` | No constraints. | Configure headers. Entries have higher priority than entries from .headers_list.
If an entry's .value is null, the entry is ignored.
| +| `headers` | `array` of [`NameStringValuePair`](#namestringvaluepair) | `false` | * `minItems`: `1`
| Configure headers. Entries have higher priority than entries from .headers_list.
If an entry's .value is null, the entry is ignored.
| | `headers_list` | one of:
* `string`
* `null`
| `false` | No constraints. | Configure headers. Entries have lower priority than entries from .headers.
The value is a list of comma separated key-value pairs matching the format of OTEL_EXPORTER_OTLP_HEADERS. See https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/protocol/exporter.md#configuration-options for details.
If omitted or null, no headers are added.
| | `timeout` | one of:
* `integer`
* `null`
| `false` | * `minimum`: `0`
| Configure max time (in milliseconds) to wait for each export.
Value must be non-negative. A value of 0 indicates no limit (infinity).
If omitted or null, 10000 is used.
| | `tls` | [`HttpTls`](#httptls) | `false` | No constraints. | Configure TLS settings for the exporter. | @@ -4883,6 +4911,7 @@ Usages: }, "headers": { "type": "array", + "minItems": 1, "items": { "$ref": "#/$defs/NameStringValuePair" } @@ -4922,7 +4951,7 @@ Usages: | `encoding` | [`OtlpHttpEncoding`](#otlphttpencoding) | `false` | No constraints. | Configure the encoding used for messages.
Values include: protobuf, json. Implementations may not support json.
If omitted or null, protobuf is used.
| | `endpoint` | one of:
* `string`
* `null`
| `false` | No constraints. | Configure endpoint, including the signal specific path.
If omitted or null, the http://localhost:4318/v1/{signal} (where signal is 'traces', 'logs', or 'metrics') is used.
| | `endpoint` | one of:
* `string`
* `null`
| `false` | No constraints. | Configure endpoint.
If omitted or null, http://localhost:4317 is used.
| -| `headers` | `array` of [`NameStringValuePair`](#namestringvaluepair) | `false` | No constraints. | Configure headers. Entries have higher priority than entries from .headers_list.
If an entry's .value is null, the entry is ignored.
| +| `headers` | `array` of [`NameStringValuePair`](#namestringvaluepair) | `false` | * `minItems`: `1`
| Configure headers. Entries have higher priority than entries from .headers_list.
If an entry's .value is null, the entry is ignored.
| | `headers_list` | one of:
* `string`
* `null`
| `false` | No constraints. | Configure headers. Entries have lower priority than entries from .headers.
The value is a list of comma separated key-value pairs matching the format of OTEL_EXPORTER_OTLP_HEADERS. See https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/protocol/exporter.md#configuration-options for details.
If omitted or null, no headers are added.
| | `temporality_preference` | [`ExporterTemporalityPreference`](#exportertemporalitypreference) | `false` | No constraints. | Configure temporality preference.
Values include: cumulative, delta, low_memory. For behavior of values, see https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/metrics/sdk_exporters/otlp.md.
If omitted or null, cumulative is used.
| | `timeout` | one of:
* `integer`
* `null`
| `false` | * `minimum`: `0`
| Configure max time (in milliseconds) to wait for each export.
Value must be non-negative. A value of 0 indicates no limit (infinity).
If omitted or null, 10000 is used.
| @@ -4975,6 +5004,7 @@ Usages: }, "headers": { "type": "array", + "minItems": 1, "items": { "$ref": "common.json#/$defs/NameStringValuePair" } @@ -5078,7 +5108,7 @@ Usages: | `cardinality_limits` | [`CardinalityLimits`](#cardinalitylimits) | `false` | No constraints. | Configure cardinality limits. | | `exporter` | [`PushMetricExporter`](#pushmetricexporter) | `true` | No constraints. | Configure exporter. | | `interval` | one of:
* `integer`
* `null`
| `false` | * `minimum`: `0`
| Configure delay interval (in milliseconds) between start of two consecutive exports.
Value must be non-negative.
If omitted or null, 60000 is used.
| -| `producers` | `array` of [`MetricProducer`](#metricproducer) | `false` | No constraints. | Configure metric producers. | +| `producers` | `array` of [`MetricProducer`](#metricproducer) | `false` | * `minItems`: `1`
| Configure metric producers. | | `timeout` | one of:
* `integer`
* `null`
| `false` | * `minimum`: `0`
| Configure maximum allowed time (in milliseconds) to export data.
Value must be non-negative. A value of 0 indicates no limit (infinity).
If omitted or null, 30000 is used.
|
@@ -5129,6 +5159,7 @@ Usages: }, "producers": { "type": "array", + "minItems": 1, "items": { "$ref": "#/$defs/MetricProducer" } @@ -5147,7 +5178,7 @@ Usages: | Property | Type | Required? | Constraints | Description | |---|---|---|---|---| -| `composite` | `array` of [`TextMapPropagator`](#textmappropagator) | `false` | No constraints. | Configure the propagators in the composite text map propagator. Entries from .composite_list are appended to the list here with duplicates filtered out.
Built-in propagator keys include: tracecontext, baggage, b3, b3multi, jaeger, ottrace. Known third party keys include: xray.
If the resolved list of propagators (from .composite and .composite_list) is empty, a noop propagator is used.
| +| `composite` | `array` of [`TextMapPropagator`](#textmappropagator) | `false` | * `minItems`: `1`
| Configure the propagators in the composite text map propagator. Entries from .composite_list are appended to the list here with duplicates filtered out.
Built-in propagator keys include: tracecontext, baggage, b3, b3multi, jaeger, ottrace. Known third party keys include: xray.
If the resolved list of propagators (from .composite and .composite_list) is empty, a noop propagator is used.
| | `composite_list` | one of:
* `string`
* `null`
| `false` | No constraints. | Configure the propagators in the composite text map propagator. Entries are appended to .composite with duplicates filtered out.
The value is a comma separated list of propagator identifiers matching the format of OTEL_PROPAGATORS. See https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/configuration/sdk-environment-variables.md#general-sdk-configuration for details.
Built-in propagator identifiers include: tracecontext, baggage, b3, b3multi, jaeger, ottrace. Known third party identifiers include: xray.
If the resolved list of propagators (from .composite and .composite_list) is empty, a noop propagator is used.
|
@@ -5179,6 +5210,7 @@ Usages: "properties": { "composite": { "type": "array", + "minItems": 1, "items": { "$ref": "#/$defs/TextMapPropagator" } @@ -5322,7 +5354,7 @@ Usages: |---|---|---|---|---| | `cardinality_limits` | [`CardinalityLimits`](#cardinalitylimits) | `false` | No constraints. | Configure cardinality limits. | | `exporter` | [`PullMetricExporter`](#pullmetricexporter) | `true` | No constraints. | Configure exporter. | -| `producers` | `array` of [`MetricProducer`](#metricproducer) | `false` | No constraints. | Configure metric producers. | +| `producers` | `array` of [`MetricProducer`](#metricproducer) | `false` | * `minItems`: `1`
| Configure metric producers. |
Language support status @@ -5356,6 +5388,7 @@ Usages: }, "producers": { "type": "array", + "minItems": 1, "items": { "$ref": "#/$defs/MetricProducer" } @@ -5437,7 +5470,7 @@ Usages: | Property | Type | Required? | Constraints | Description | |---|---|---|---|---| -| `attributes` | `array` of [`AttributeNameValue`](#attributenamevalue) | `false` | No constraints. | Configure resource attributes. Entries have higher priority than entries from .resource.attributes_list.
| +| `attributes` | `array` of [`AttributeNameValue`](#attributenamevalue) | `false` | * `minItems`: `1`
| Configure resource attributes. Entries have higher priority than entries from .resource.attributes_list.
| | `attributes_list` | one of:
* `string`
* `null`
| `false` | No constraints. | Configure resource attributes. Entries have lower priority than entries from .resource.attributes.
The value is a list of comma separated key-value pairs matching the format of OTEL_RESOURCE_ATTRIBUTES. See https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/configuration/sdk-environment-variables.md#general-sdk-configuration for details.
If omitted or null, no resource attributes are added.
| | `detection/development`
**WARNING:** This property is [experimental](README.md#experimental-features). | [`ExperimentalResourceDetection`](#experimentalresourcedetection) | `false` | No constraints. | Configure resource detection.
If omitted or null, resource detection is disabled.
| | `schema_url` | one of:
* `string`
* `null`
| `false` | No constraints. | Configure resource schema URL.
If omitted or null, no schema URL is used.
| @@ -5473,6 +5506,7 @@ Usages: "properties": { "attributes": { "type": "array", + "minItems": 1, "items": { "$ref": "#/$defs/AttributeNameValue" } @@ -5519,19 +5553,22 @@ Usages: "type": "array", "items": { "type": "string" - } + }, + "minItems": 1 }, { "type": "array", "items": { "type": "boolean" - } + }, + "minItems": 1 }, { "type": "array", "items": { "type": "number" - } + }, + "minItems": 1 } ] }, @@ -5569,6 +5606,7 @@ Usages: }, "detectors": { "type": "array", + "minItems": 1, "items": { "$ref": "#/$defs/ExperimentalResourceDetector" } @@ -6625,6 +6663,7 @@ Usages: }, "tracers": { "type": "array", + "minItems": 1, "items": { "$ref": "#/$defs/ExperimentalTracerMatcherAndConfig" } diff --git a/schema/common.json b/schema/common.json index 2e7b918a..0c8dbc8e 100644 --- a/schema/common.json +++ b/schema/common.json @@ -8,12 +8,14 @@ "properties": { "included": { "type": "array", + "minItems": 1, "items": { "type": "string" } }, "excluded": { "type": "array", + "minItems": 1, "items": { "type": "string" } @@ -47,6 +49,7 @@ }, "headers": { "type": "array", + "minItems": 1, "items": { "$ref": "#/$defs/NameStringValuePair" } @@ -85,6 +88,7 @@ }, "headers": { "type": "array", + "minItems": 1, "items": { "$ref": "#/$defs/NameStringValuePair" } diff --git a/schema/instrumentation.json b/schema/instrumentation.json index 39fec324..5a2070b1 100644 --- a/schema/instrumentation.json +++ b/schema/instrumentation.json @@ -60,6 +60,7 @@ "properties": { "service_mapping": { "type": "array", + "minItems": 1, "items": { "$ref": "#/$defs/ExperimentalPeerServiceMapping" } @@ -88,6 +89,7 @@ "properties": { "request_captured_headers": { "type": "array", + "minItems": 1, "items": { "type": "string" } @@ -106,12 +108,14 @@ "properties": { "request_captured_headers": { "type": "array", + "minItems": 1, "items": { "type": "string" } }, "response_captured_headers": { "type": "array", + "minItems": 1, "items": { "type": "string" } diff --git a/schema/logger_provider.json b/schema/logger_provider.json index f2a6a725..060aa2d0 100644 --- a/schema/logger_provider.json +++ b/schema/logger_provider.json @@ -123,6 +123,7 @@ }, "loggers": { "type": "array", + "minItems": 1, "items": { "$ref": "#/$defs/ExperimentalLoggerMatcherAndConfig" } diff --git a/schema/meter_provider.json b/schema/meter_provider.json index ab61febf..1bf3ecb3 100644 --- a/schema/meter_provider.json +++ b/schema/meter_provider.json @@ -13,6 +13,7 @@ }, "views": { "type": "array", + "minItems": 1, "items": { "$ref": "#/$defs/View" } @@ -53,6 +54,7 @@ }, "producers": { "type": "array", + "minItems": 1, "items": { "$ref": "#/$defs/MetricProducer" } @@ -74,6 +76,7 @@ }, "producers": { "type": "array", + "minItems": 1, "items": { "$ref": "#/$defs/MetricProducer" } @@ -244,6 +247,7 @@ }, "headers": { "type": "array", + "minItems": 1, "items": { "$ref": "common.json#/$defs/NameStringValuePair" } @@ -281,6 +285,7 @@ }, "headers": { "type": "array", + "minItems": 1, "items": { "$ref": "common.json#/$defs/NameStringValuePair" } @@ -441,6 +446,7 @@ "properties": { "boundaries": { "type": "array", + "minItems": 0, "items": { "type": "number" } @@ -485,6 +491,7 @@ }, "meters": { "type": "array", + "minItems": 1, "items": { "$ref": "#/$defs/ExperimentalMeterMatcherAndConfig" } diff --git a/schema/propagator.json b/schema/propagator.json index 322ac50a..7751a029 100644 --- a/schema/propagator.json +++ b/schema/propagator.json @@ -6,6 +6,7 @@ "properties": { "composite": { "type": "array", + "minItems": 1, "items": { "$ref": "#/$defs/TextMapPropagator" } diff --git a/schema/resource.json b/schema/resource.json index 859ddf27..c34cf404 100644 --- a/schema/resource.json +++ b/schema/resource.json @@ -6,6 +6,7 @@ "properties": { "attributes": { "type": "array", + "minItems": 1, "items": { "$ref": "#/$defs/AttributeNameValue" } @@ -34,9 +35,9 @@ {"type": "number"}, {"type": "boolean"}, {"type": "null"}, - {"type": "array", "items": {"type": "string"}}, - {"type": "array", "items": {"type": "boolean"}}, - {"type": "array", "items": {"type": "number"}} + {"type": "array", "items": {"type": "string"}, "minItems": 1}, + {"type": "array", "items": {"type": "boolean"}, "minItems": 1}, + {"type": "array", "items": {"type": "number"}, "minItems": 1} ] }, "type": { @@ -69,6 +70,7 @@ }, "detectors": { "type": "array", + "minItems": 1, "items": { "$ref": "#/$defs/ExperimentalResourceDetector" } diff --git a/schema/tracer_provider.json b/schema/tracer_provider.json index f350f0a9..9187a39d 100644 --- a/schema/tracer_provider.json +++ b/schema/tracer_provider.json @@ -318,6 +318,7 @@ }, "tracers": { "type": "array", + "minItems": 1, "items": { "$ref": "#/$defs/ExperimentalTracerMatcherAndConfig" }