diff --git a/README.md b/README.md index fa1b5b7..647e17b 100644 --- a/README.md +++ b/README.md @@ -86,6 +86,41 @@ When a type requires a configurable list of name-value pairs (i.e. resource attr value: ${AUTHORIZATION_HEADER_VALUE} ``` +### Required and null properties + +JSON schema has two related but subtly different concepts involved in indicating the requirement level of properties and values: + +* [`type` of `null`](https://json-schema.org/understanding-json-schema/reference/null): When a property includes a type of `null` along with other allowed types (i.e. `"type": ["string", "null"]`), it indicates that even if the property key is present, the value may be omitted. This is useful in a variety of situations: + * When modeling properties with primitive types which are candidates for [env var substitution][], since allowing `null` means that the configuration is valid even if the referenced env var is undefined. + * When modeling objects which do not require any properties. In these cases, either no properties are required, or there are no properties and the presence of the property key expresses the desired state. +* [required](https://json-schema.org/understanding-json-schema/reference/object#required): When a property is `required`, the key must be included in the object or the configuration is invalid. Properties should be required when there is no well default semantic (i.e. it's not clear what the behavior is when the property is absent). + +For example: + +``` +tracer_provider: + processors: + - simple: + exporter: + console: + limits: + attribute_value_length_limit: ${OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT} +``` + +* `tracer_provider` is not required. When omitted, a noop tracer provider is used. +* `tracer_provider`'s type is `object`. There's no sensible tracer provider which does not minimally set one entry in `processors`. +* `exporter` is required. A simple processor without an exporter is invalid. +* `exporter`'s type is `object`. Setting `exporter` to `null` or any non-object value is invalid. +* `console`'s type is `["object", "null"]`. The console exporter has no properties, and we should not force the user to set an empty object (i.e `console: {}`). +* `limits` is not required. When omitted, default span limits are used. +* `limits`'s type is `object`. If a user includes the `limits` property, they must set at least one property. Settings `limits` to `null` is invalid. +* `attributes_value_length_limit` is not required. If omitted, no attribute length limits are applied. +* `attributes_value_length_limit`'s type is `["integer", "null]`. If null (i.e. because the `OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT` env var is unset), no attribute length limits are applied. + +If a property is _not_ required, it should include a [comment](./CONTRIBUTING.md#description-generation) describing the semantics when it is omitted. + +If a property `type` includes `null`, it must include a [comment](./CONTRIBUTING.md#description-generation) describing the semantics when the value is `null`. It's common for properties with primitive types to allow `null`. `object` types allow `null` if no properties are required and the presence of the property key is meaningful. + ## Contributing See [CONTRIBUTING.md](CONTRIBUTING.md) diff --git a/examples/kitchen-sink.yaml b/examples/kitchen-sink.yaml index dcd86bc..0839b5a 100644 --- a/examples/kitchen-sink.yaml +++ b/examples/kitchen-sink.yaml @@ -9,57 +9,71 @@ # The yaml format is documented at # https://github.com/open-telemetry/opentelemetry-configuration/tree/main/schema file_format: "0.3" - -# Configure if the SDK is disabled or not. This is not required to be provided to ensure the SDK isn't disabled, the default value when this is not provided is for the SDK to be enabled. +# Configure if the SDK is disabled or not. +# If omitted or null, false is used. disabled: false - # Configure general attribute limits. See also tracer_provider.limits, logger_provider.limits. attribute_limits: # Configure max attribute value size. + # If omitted or null, there is no limit. attribute_value_length_limit: 4096 # Configure max attribute count. + # If omitted or null, 128 is used. attribute_count_limit: 128 - # Configure logger provider. +# If omitted, a noop logger provider is used. logger_provider: # Configure log record processors. processors: - # Configure a batch log record processor. batch: # Configure delay interval (in milliseconds) between two consecutive exports. + # If omitted or null, 1000 is used. schedule_delay: 5000 # Configure maximum allowed time (in milliseconds) to export data. + # If omitted or null, 30000 is used. export_timeout: 30000 # Configure maximum queue size. + # If omitted or null, 2048 is used. max_queue_size: 2048 # Configure maximum batch size. + # If omitted or null, 512 is used. max_export_batch_size: 512 # Configure exporter. exporter: # Configure exporter to be OTLP. otlp: - # Configure protocol. + # Configure protocol. Values include: http/protobuf, http/json, grpc. protocol: http/protobuf # Configure endpoint. + # If .protocol is http/protobuf or http/json, the signal specific path must be included (i.e. http://localhost:4318/v1/{signal}). If .protocol is grpc, a path should not be included (i.e. http://localhost:4317). endpoint: http://localhost:4318/v1/logs - # Configure certificate. + # Configure certificate. Absolute path to certificate file. + # If omitted or null, system default certificate verification is used for secure connections. certificate: /app/cert.pem - # Configure mTLS private client key. + # Configure mTLS private client key. Absolute path to client key in PEM format. If set, .client_certificate must also be set. + # If omitted or null, mTLS is not used. client_key: /app/cert.pem - # Configure mTLS client certificate. + # Configure mTLS client certificate. Absolute path to certificate file. If set, .client_key must also be set. + # If omitted or null, mTLS is not used. client_certificate: /app/cert.pem # Configure headers. Entries have higher priority than entries from .headers_list. + # If an entry's .value is null, the entry is ignored. headers: - name: api-key value: "1234" # 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. headers_list: "api-key=1234" - # Configure compression. + # Configure compression. Values include: gzip, none. Implementations may support other compression algorithms. + # If omitted or null, none is used. compression: gzip # Configure max time (in milliseconds) to wait for each export. + # If omitted or null, 10000 is used. timeout: 10000 - # Configure client transport security for the exporter's connection. + # Configure client transport security for the exporter's connection. Only applicable when .protocol is grpc and .endpoint is provided without http or https scheme. Implementations may choose to ignore .insecure. + # If omitted or null, false is used. insecure: false - # Configure a simple log record processor. simple: @@ -70,11 +84,13 @@ logger_provider: # Configure log record limits. See also attribute_limits. limits: # Configure max attribute value size. Overrides .attribute_limits.attribute_value_length_limit. + # If omitted or null, there is no limit. attribute_value_length_limit: 4096 # Configure max attribute count. Overrides .attribute_limits.attribute_count_limit. + # If omitted or null, 128 is used. attribute_count_limit: 128 - # Configure meter provider. +# If omitted, a noop meter provider is used. meter_provider: # Configure metric readers. readers: @@ -85,27 +101,34 @@ meter_provider: # Configure exporter to be prometheus. prometheus: # Configure host. + # If omitted or null, localhost is used. host: localhost # Configure port. + # If omitted or null, 9464 is used. port: 9464 # Configure Prometheus Exporter to produce metrics without a unit suffix or UNIT metadata. + # If omitted or null, false is used. without_units: false # Configure Prometheus Exporter to produce metrics without a type suffix. + # If omitted or null, false is used. without_type_suffix: false # Configure Prometheus Exporter to produce metrics without a scope info metric. + # If omitted or null, false is used. without_scope_info: false # Configure Prometheus Exporter to add resource attributes as metrics attributes. with_resource_constant_labels: - # Configure resource attributes to be included. If not set, no resource attributes are included. + # Configure resource attributes to be included. # Attribute keys from resources are evaluated to match as follows: # * If the value of the attribute key exactly matches. # * If the value of the attribute key matches the wildcard pattern, where '?' matches any single character and '*' matches any number of characters including none. + # If omitted, no resource attributes are included. included: - "service*" # Configure resource attributes to be excluded. Applies after .with_resource_constant_labels.included (i.e. excluded has higher priority than included). # Attribute keys from resources are evaluated to match as follows: # * If the value of the attribute key exactly matches. # * If the value of the attribute key matches the wildcard pattern, where '?' matches any single character and '*' matches any number of characters including none. + # If omitted, .included resource attributes are included. excluded: - "service.attr1" # Configure metric producers. @@ -115,39 +138,52 @@ meter_provider: - # Configure a periodic metric reader. periodic: # Configure delay interval (in milliseconds) between start of two consecutive exports. + # If omitted or null, 60000 is used. interval: 60000 # Configure maximum allowed time (in milliseconds) to export data. + # If omitted or null, 30000 is used. timeout: 30000 # Configure exporter. exporter: # Configure exporter to be OTLP. otlp: - # Configure protocol. + # Configure protocol. Values include: http/protobuf, http/json, grpc. protocol: http/protobuf # Configure endpoint. + # If .protocol is http/protobuf or http/json, the signal specific path must be included (i.e. http://localhost:4318/v1/{signal}). If .protocol is grpc, a path should not be included (i.e. http://localhost:4317). endpoint: http://localhost:4318/v1/metrics - # Configure certificate. + # Configure certificate. Absolute path to certificate file. + # If omitted or null, system default certificate verification is used for secure connections. certificate: /app/cert.pem - # Configure mTLS private client key. + # Configure mTLS private client key. Absolute path to client key in PEM format. If set, .client_certificate must also be set. + # If omitted or null, mTLS is not used. client_key: /app/cert.pem - # Configure mTLS client certificate. + # Configure mTLS client certificate. Absolute path to certificate file. If set, .client_key must also be set. + # If omitted or null, mTLS is not used. client_certificate: /app/cert.pem # Configure headers. Entries have higher priority than entries from .headers_list. + # If an entry's .value is null, the entry is ignored. headers: - name: api-key value: "1234" # 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. headers_list: "api-key=1234" - # Configure compression. + # Configure compression. Values include: gzip, none. Implementations may support other compression algorithms. + # If omitted or null, none is used. compression: gzip # Configure max time (in milliseconds) to wait for each export. + # If omitted or null, 10000 is used. timeout: 10000 - # Configure client transport security for the exporter's connection. + # Configure client transport security for the exporter's connection. Only applicable when .protocol is grpc and .endpoint is provided without http or https scheme. Implementations may choose to ignore .insecure. + # If omitted or null, false is used. insecure: false - # Configure temporality preference. + # 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. temporality_preference: delta - # Configure default histogram aggregation. + # 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. default_histogram_aggregation: base2_exponential_bucket_histogram # Configure metric producers. producers: @@ -161,31 +197,41 @@ meter_provider: 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. + - # Configure view selector. Selection criteria is additive as described in https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/metrics/sdk.md#instrument-selection-criteria. selector: # Configure instrument name selection criteria. + # If omitted or null, all instrument names match. instrument_name: my-instrument # Configure instrument type selection criteria. + # If omitted or null, all instrument types match. instrument_type: histogram # Configure the instrument unit selection criteria. + # If omitted or null, all instrument units match. unit: ms # Configure meter name selection criteria. + # If omitted or null, all meter names match. meter_name: my-meter # Configure meter version selection criteria. + # If omitted or null, all meter versions match. meter_version: 1.0.0 # Configure meter schema url selection criteria. + # If omitted or null, all meter schema URLs match. meter_schema_url: https://opentelemetry.io/schemas/1.16.0 # Configure view stream. stream: # Configure metric name of the resulting stream(s). + # If omitted or null, the instrument's original name is used. name: new_instrument_name # Configure metric description of the resulting stream(s). + # If omitted or null, the instrument's origin description is used. description: new_description - # Configure aggregation of the resulting stream(s). Known values include: default, drop, explicit_bucket_histogram, base2_exponential_bucket_histogram, last_value, sum. + # Configure aggregation of the resulting stream(s). Values include: default, drop, explicit_bucket_histogram, base2_exponential_bucket_histogram, last_value, sum. For behavior of values see https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/metrics/sdk.md#aggregation. + # If omitted, default is used. aggregation: # Configure aggregation to be explicit_bucket_histogram. explicit_bucket_histogram: # Configure bucket boundaries. + # If omitted, [0, 5, 10, 25, 50, 75, 100, 250, 500, 750, 1000, 2500, 5000, 7500, 10000] is used. boundaries: [ 0.0, @@ -205,64 +251,81 @@ meter_provider: 10000.0 ] # Configure record min and max. + # If omitted or null, true is used. record_min_max: true # Configure attribute keys retained in the resulting stream(s). attribute_keys: - # Configure list of attribute keys to include in the resulting stream(s). All other attributes are dropped. If not set, stream attributes are not configured. + # Configure list of attribute keys to include in the resulting stream(s). All other attributes are dropped. + # If omitted, all attributes are included. included: - key1 - key2 # Configure list of attribute keys to exclude from the resulting stream(s). Applies after .attribute_keys.included (i.e. excluded has higher priority than included). + # If omitted, .attribute_keys.included are included. excluded: - key3 - # Configure the exemplar filter. Known values include: trace_based, always_on, always_off. + # 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. exemplar_filter: trace_based - # Configure text map context propagators. +# If omitted, tracecontext and baggage are used. propagator: - # Configure the set of propagators to include in the composite text map propagator. + # Configure the set of propagators to include in the composite text map propagator. Built-in values include: tracecontext, baggage, b3, b3multi, jaeger, none. Known third party values include: xray, ottrace. For behavior of values see https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/configuration/sdk-environment-variables.md#general-sdk-configuration. composite: [ tracecontext, baggage, b3, b3multi, jaeger, xray, ottrace ] - # Configure tracer provider. +# If omitted, a noop tracer provider is used. tracer_provider: # Configure span processors. processors: - # Configure a batch span processor. batch: # Configure delay interval (in milliseconds) between two consecutive exports. + # If omitted or null, 5000 is used. schedule_delay: 5000 # Configure maximum allowed time (in milliseconds) to export data. + # If omitted or null, 30000 is used. export_timeout: 30000 # Configure maximum queue size. + # If omitted or null, 2048 is used. max_queue_size: 2048 # Configure maximum batch size. + # If omitted or null, 512 is used. max_export_batch_size: 512 # Configure exporter. exporter: # Configure exporter to be OTLP. otlp: - # Configure protocol. + # Configure protocol. Values include: http/protobuf, http/json, grpc. protocol: http/protobuf # Configure endpoint. + # If .protocol is http/protobuf or http/json, the signal specific path must be included (i.e. http://localhost:4318/v1/{signal}). If .protocol is grpc, a path should not be included (i.e. http://localhost:4317). endpoint: http://localhost:4318/v1/traces - # Configure certificate. + # Configure certificate. Absolute path to certificate file. + # If omitted or null, system default certificate verification is used for secure connections. certificate: /app/cert.pem - # Configure mTLS private client key. + # Configure mTLS private client key. Absolute path to client key in PEM format. If set, .client_certificate must also be set. + # If omitted or null, mTLS is not used. client_key: /app/cert.pem - # Configure mTLS client certificate. + # Configure mTLS client certificate. Absolute path to certificate file. If set, .client_key must also be set. + # If omitted or null, mTLS is not used. client_certificate: /app/cert.pem # Configure headers. Entries have higher priority than entries from .headers_list. + # If an entry's .value is null, the entry is ignored. headers: - name: api-key value: "1234" # 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. headers_list: "api-key=1234" - # Configure compression. + # Configure compression. Values include: gzip, none. Implementations may support other compression algorithms. + # If omitted or null, none is used. compression: gzip # Configure max time (in milliseconds) to wait for each export. + # If omitted or null, 10000 is used. timeout: 10000 - # Configure client transport security for the exporter's connection. + # Configure client transport security for the exporter's connection. Only applicable when .protocol is grpc and .endpoint is provided without http or https scheme. Implementations may choose to ignore .insecure. + # If omitted or null, false is used. insecure: false - # Configure a batch span processor. batch: @@ -271,8 +334,10 @@ tracer_provider: # Configure exporter to be zipkin. zipkin: # Configure endpoint. + # If omitted or null, http://localhost:9411/api/v2/spans is used. endpoint: http://localhost:9411/api/v2/spans # Configure max time (in milliseconds) to wait for each export. + # If omitted or null, 10000 is used. timeout: 10000 - # Configure a simple span processor. simple: @@ -283,49 +348,62 @@ tracer_provider: # Configure span limits. See also attribute_limits. limits: # Configure max attribute value size. Overrides .attribute_limits.attribute_value_length_limit. + # If omitted or null, there is no limit. attribute_value_length_limit: 4096 # Configure max attribute count. Overrides .attribute_limits.attribute_count_limit. + # If omitted or null, 128 is used. attribute_count_limit: 128 # Configure max span event count. + # If omitted or null, 128 is used. event_count_limit: 128 # Configure max span link count. + # If omitted or null, 128 is used. link_count_limit: 128 # Configure max attributes per span event. + # If omitted or null, 128 is used. event_attribute_count_limit: 128 # Configure max attributes per span link. + # If omitted or null, 128 is used. link_attribute_count_limit: 128 # Configure the sampler. + # If omitted, parent based sampler with a root of always_on is used. sampler: # Configure sampler to be parent_based. parent_based: # Configure root sampler. + # If omitted or null, always_on is used. root: # Configure sampler to be trace_id_ratio_based. trace_id_ratio_based: # Configure trace_id_ratio. + # If omitted or null, 1.0 is used. ratio: 0.0001 # Configure remote_parent_sampled sampler. + # If omitted or null, always_on is used. remote_parent_sampled: # Configure sampler to be always_on. always_on: # Configure remote_parent_not_sampled sampler. + # If omitted or null, always_off is used. remote_parent_not_sampled: # Configure sampler to be always_off. always_off: # Configure local_parent_sampled sampler. + # If omitted or null, always_on is used. local_parent_sampled: # Configure sampler to be always_on. always_on: # Configure local_parent_not_sampled sampler. + # If omitted or null, always_off is used. local_parent_not_sampled: # Configure sampler to be always_off. always_off: - - # Configure resource for all signals. +# If omitted, the default resource is used. resource: # Configure resource attributes. Entries have higher priority than entries from .resource.attributes_list. - # Entries must contain .name and .value, and may optionally include .type, which defaults to "string" if not set. The value must match the type. Values for .type include: string, bool, int, double, string_array, bool_array, int_array, double_array. + # Entries must contain .name and .value, and may optionally include .type. If an entry's .type omitted or null, string is used. + # The .value's type must match the .type. Values for .type include: string, bool, int, double, string_array, bool_array, int_array, double_array. attributes: - name: service.name value: unknown_service @@ -355,26 +433,29 @@ resource: type: double_array # 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. attributes_list: "service.namespace=my-namespace,service.version=1.0.0" # Configure resource detectors. detectors: # Configure attributes provided by resource detectors. attributes: - # Configure list of attribute key patterns to include from resource detectors. If not set, all attributes are included. + # Configure list of attribute key patterns to include from resource detectors. # Attribute keys from resource detectors are evaluated to match as follows: # * If the value of the attribute key exactly matches. # * If the value of the attribute key matches the wildcard pattern, where '?' matches any single character and '*' matches any number of characters including none. + # If omitted, all attributes are included. included: - process.* # Configure list of attribute key patterns to exclude from resource detectors. Applies after .resource.detectors.attributes.included (i.e. excluded has higher priority than included). # Attribute keys from resource detectors are evaluated to match as follows: # * If the value of the attribute key exactly matches. # * If the value of the attribute key matches the wildcard pattern, where '?' matches any single character and '*' matches any number of characters including none. + # If omitted, .included attributes are included. excluded: - process.command_args # Configure resource schema URL. + # If omitted or null, no schema URL is used. schema_url: https://opentelemetry.io/schemas/1.16.0 - # Configure instrumentation. instrumentation: # Configure general SemConv options that may apply to multiple languages and instrumentations. diff --git a/examples/sdk-config.yaml b/examples/sdk-config.yaml index 40ca996..7c4824d 100644 --- a/examples/sdk-config.yaml +++ b/examples/sdk-config.yaml @@ -9,180 +9,227 @@ # The yaml format is documented at # https://github.com/open-telemetry/opentelemetry-configuration/tree/main/schema file_format: "0.3" - -# Configure if the SDK is disabled or not. This is not required to be provided to ensure the SDK isn't disabled, the default value when this is not provided is for the SDK to be enabled. +# Configure if the SDK is disabled or not. +# If omitted or null, false is used. disabled: false - # Configure resource for all signals. +# If omitted, the default resource is used. resource: # Configure resource attributes. Entries have higher priority than entries from .resource.attributes_list. - # Entries must contain .name and .value, and may optionally include .type, which defaults to "string" if not set. The value must match the type. Values for .type include: string, bool, int, double, string_array, bool_array, int_array, double_array. + # Entries must contain .name and .value, and may optionally include .type. If an entry's .type omitted or null, string is used. + # The .value's type must match the .type. Values for .type include: string, bool, int, double, string_array, bool_array, int_array, double_array. attributes: - name: service.name value: unknown_service - # Configure general attribute limits. See also tracer_provider.limits, logger_provider.limits. attribute_limits: # Configure max attribute value size. + # If omitted or null, there is no limit. attribute_value_length_limit: # Configure max attribute count. + # If omitted or null, 128 is used. attribute_count_limit: 128 - # Configure text map context propagators. +# If omitted, tracecontext and baggage are used. propagator: - # Configure the set of propagators to include in the composite text map propagator. + # Configure the set of propagators to include in the composite text map propagator. Built-in values include: tracecontext, baggage, b3, b3multi, jaeger, none. Known third party values include: xray, ottrace. For behavior of values see https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/configuration/sdk-environment-variables.md#general-sdk-configuration. composite: [ tracecontext, baggage ] - # Configure tracer provider. +# If omitted, a noop tracer provider is used. tracer_provider: # Configure span processors. processors: - # Configure a batch span processor. batch: # Configure delay interval (in milliseconds) between two consecutive exports. + # If omitted or null, 5000 is used. schedule_delay: 5000 # Configure maximum allowed time (in milliseconds) to export data. + # If omitted or null, 30000 is used. export_timeout: 30000 # Configure maximum queue size. + # If omitted or null, 2048 is used. max_queue_size: 2048 # Configure maximum batch size. + # If omitted or null, 512 is used. max_export_batch_size: 512 # Configure exporter. exporter: # Configure exporter to be OTLP. otlp: - # Configure protocol. + # Configure protocol. Values include: http/protobuf, http/json, grpc. protocol: http/protobuf # Configure endpoint. + # If .protocol is http/protobuf or http/json, the signal specific path must be included (i.e. http://localhost:4318/v1/{signal}). If .protocol is grpc, a path should not be included (i.e. http://localhost:4317). endpoint: http://localhost:4318/v1/traces - # Configure certificate. + # Configure certificate. Absolute path to certificate file. + # If omitted or null, system default certificate verification is used for secure connections. certificate: - # Configure mTLS private client key. + # Configure mTLS private client key. Absolute path to client key in PEM format. If set, .client_certificate must also be set. + # If omitted or null, mTLS is not used. client_key: - # Configure mTLS client certificate. + # Configure mTLS client certificate. Absolute path to certificate file. If set, .client_key must also be set. + # If omitted or null, mTLS is not used. client_certificate: - # Configure compression. + # Configure compression. Values include: gzip, none. Implementations may support other compression algorithms. + # If omitted or null, none is used. compression: gzip # Configure max time (in milliseconds) to wait for each export. + # 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. - attribute_value_length_limit: # Configure max span attribute count. Overrides attribute_limits.attribute_count_limit. - + # If omitted or null, there is no limit. + attribute_value_length_limit: # Configure max attribute count. Overrides .attribute_limits.attribute_count_limit. + # If omitted or null, 128 is used. attribute_count_limit: 128 # Configure max span event count. + # If omitted or null, 128 is used. event_count_limit: 128 # Configure max span link count. + # If omitted or null, 128 is used. link_count_limit: 128 # Configure max attributes per span event. + # If omitted or null, 128 is used. event_attribute_count_limit: 128 # Configure max attributes per span link. + # If omitted or null, 128 is used. link_attribute_count_limit: 128 # Configure the sampler. + # If omitted, parent based sampler with a root of always_on is used. sampler: # Configure sampler to be parent_based. parent_based: # Configure root sampler. + # If omitted or null, always_on is used. root: # Configure sampler to be always_on. always_on: # Configure remote_parent_sampled sampler. + # If omitted or null, always_on is used. remote_parent_sampled: # Configure sampler to be always_on. always_on: # Configure remote_parent_not_sampled sampler. + # If omitted or null, always_off is used. remote_parent_not_sampled: # Configure sampler to be always_off. always_off: # Configure local_parent_sampled sampler. + # If omitted or null, always_on is used. local_parent_sampled: # Configure sampler to be always_on. always_on: # Configure local_parent_not_sampled sampler. + # If omitted or null, always_off is used. local_parent_not_sampled: # Configure sampler to be always_off. always_off: - - # Configure meter provider. +# If omitted, a noop meter provider is used. meter_provider: # Configure metric readers. readers: - # Configure a periodic metric reader. periodic: # Configure delay interval (in milliseconds) between start of two consecutive exports. + # If omitted or null, 60000 is used. interval: 60000 # Configure maximum allowed time (in milliseconds) to export data. + # If omitted or null, 30000 is used. timeout: 30000 # Configure exporter. exporter: # Configure exporter to be OTLP. otlp: - # Configure protocol. + # Configure protocol. Values include: http/protobuf, http/json, grpc. protocol: http/protobuf # Configure endpoint. + # If .protocol is http/protobuf or http/json, the signal specific path must be included (i.e. http://localhost:4318/v1/{signal}). If .protocol is grpc, a path should not be included (i.e. http://localhost:4317). endpoint: http://localhost:4318/v1/metrics - # Configure certificate. + # Configure certificate. Absolute path to certificate file. + # If omitted or null, system default certificate verification is used for secure connections. certificate: - # Configure mTLS private client key. + # Configure mTLS private client key. Absolute path to client key in PEM format. If set, .client_certificate must also be set. + # If omitted or null, mTLS is not used. client_key: - # Configure mTLS client certificate. + # Configure mTLS client certificate. Absolute path to certificate file. If set, .client_key must also be set. + # If omitted or null, mTLS is not used. client_certificate: - # Configure compression. + # Configure compression. Values include: gzip, none. Implementations may support other compression algorithms. + # If omitted or null, none is used. compression: gzip # Configure max time (in milliseconds) to wait for each export. + # 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. + # 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. temporality_preference: cumulative - # Configure default histogram aggregation. + # 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. default_histogram_aggregation: explicit_bucket_histogram - # Configure the exemplar filter. Known values include: trace_based, always_on, always_off. + # 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. exemplar_filter: trace_based - # Configure logger provider. +# If omitted, a noop logger provider is used. logger_provider: # Configure log record processors. processors: - # Configure a batch log record processor. batch: # Configure delay interval (in milliseconds) between two consecutive exports. + # If omitted or null, 1000 is used. schedule_delay: 1000 # Configure maximum allowed time (in milliseconds) to export data. + # If omitted or null, 30000 is used. export_timeout: 30000 # Configure maximum queue size. + # If omitted or null, 2048 is used. max_queue_size: 2048 # Configure maximum batch size. + # If omitted or null, 512 is used. max_export_batch_size: 512 # Configure exporter. exporter: # Configure exporter to be OTLP. otlp: - # Configure protocol. + # Configure protocol. Values include: http/protobuf, http/json, grpc. protocol: http/protobuf # Configure endpoint. + # If .protocol is http/protobuf or http/json, the signal specific path must be included (i.e. http://localhost:4318/v1/{signal}). If .protocol is grpc, a path should not be included (i.e. http://localhost:4317). endpoint: http://localhost:4318/v1/logs - # Configure certificate. + # Configure certificate. Absolute path to certificate file. + # If omitted or null, system default certificate verification is used for secure connections. certificate: - # Configure mTLS private client key. + # Configure mTLS private client key. Absolute path to client key in PEM format. If set, .client_certificate must also be set. + # If omitted or null, mTLS is not used. client_key: - # Configure mTLS client certificate. + # Configure mTLS client certificate. Absolute path to certificate file. If set, .client_key must also be set. + # If omitted or null, mTLS is not used. client_certificate: - # Configure compression. + # Configure compression. Values include: gzip, none. Implementations may support other compression algorithms. + # If omitted or null, none is used. compression: gzip # Configure max time (in milliseconds) to wait for each export. + # 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. - attribute_value_length_limit: # Configure max log record attribute count. Overrides attribute_limits.attribute_count_limit. - + # If omitted or null, there is no limit. + attribute_value_length_limit: # Configure max attribute count. Overrides .attribute_limits.attribute_count_limit. + # If omitted or null, 128 is used. attribute_count_limit: 128 diff --git a/examples/sdk-migration-config.yaml b/examples/sdk-migration-config.yaml index 9fbcd7d..66d9402 100644 --- a/examples/sdk-migration-config.yaml +++ b/examples/sdk-migration-config.yaml @@ -38,190 +38,245 @@ # The yaml format is documented at # https://github.com/open-telemetry/opentelemetry-configuration/tree/main/schema file_format: "0.3" - -# Configure if the SDK is disabled or not. This is not required to be provided to ensure the SDK isn't disabled, the default value when this is not provided is for the SDK to be enabled. +# Configure if the SDK is disabled or not. +# If omitted or null, false is used. disabled: ${OTEL_SDK_DISABLED:-false} - # Configure resource for all signals. +# If omitted, the default resource is used. resource: # Configure resource attributes. Entries have higher priority than entries from .resource.attributes_list. - # Entries must contain .name and .value, and may optionally include .type, which defaults to "string" if not set. The value must match the type. Values for .type include: string, bool, int, double, string_array, bool_array, int_array, double_array. + # Entries must contain .name and .value, and may optionally include .type. If an entry's .type omitted or null, string is used. + # The .value's type must match the .type. Values for .type include: string, bool, int, double, string_array, bool_array, int_array, double_array. attributes: - name: service.name value: ${OTEL_SERVICE_NAME:-unknown_service} # 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. attributes_list: ${OTEL_RESOURCE_ATTRIBUTES} - # Configure general attribute limits. See also tracer_provider.limits, logger_provider.limits. attribute_limits: # Configure max attribute value size. + # If omitted or null, there is no limit. attribute_value_length_limit: ${OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT} # Configure max attribute count. + # If omitted or null, 128 is used. attribute_count_limit: ${OTEL_ATTRIBUTE_COUNT_LIMIT:-128} - # Configure text map context propagators. +# If omitted, tracecontext and baggage are used. propagator: - # Configure the set of propagators to include in the composite text map propagator. + # Configure the set of propagators to include in the composite text map propagator. Built-in values include: tracecontext, baggage, b3, b3multi, jaeger, none. Known third party values include: xray, ottrace. For behavior of values see https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/configuration/sdk-environment-variables.md#general-sdk-configuration. composite: [ tracecontext, baggage ] - # Configure tracer provider. +# If omitted, a noop tracer provider is used. tracer_provider: # Configure span processors. processors: - # Configure a batch span processor. batch: # Configure delay interval (in milliseconds) between two consecutive exports. + # If omitted or null, 5000 is used. schedule_delay: ${OTEL_BSP_SCHEDULE_DELAY:-5000} # Configure maximum allowed time (in milliseconds) to export data. + # If omitted or null, 30000 is used. export_timeout: ${OTEL_BSP_EXPORT_TIMEOUT:-30000} # Configure maximum queue size. + # If omitted or null, 2048 is used. max_queue_size: ${OTEL_BSP_MAX_QUEUE_SIZE:-2048} # Configure maximum batch size. + # If omitted or null, 512 is used. max_export_batch_size: ${OTEL_BSP_MAX_EXPORT_BATCH_SIZE:-512} # Configure exporter. exporter: # Configure exporter to be OTLP. otlp: - # Configure protocol. + # Configure protocol. Values include: http/protobuf, http/json, grpc. protocol: ${OTEL_EXPORTER_OTLP_TRACES_PROTOCOL:-http/protobuf} # Configure endpoint. + # If .protocol is http/protobuf or http/json, the signal specific path must be included (i.e. http://localhost:4318/v1/{signal}). If .protocol is grpc, a path should not be included (i.e. http://localhost:4317). endpoint: ${OTEL_EXPORTER_OTLP_TRACES_ENDPOINT:-http://localhost:4318/v1/traces} - # Configure certificate. + # Configure certificate. Absolute path to certificate file. + # If omitted or null, system default certificate verification is used for secure connections. certificate: ${OTEL_EXPORTER_OTLP_TRACES_CERTIFICATE} - # Configure mTLS private client key. + # Configure mTLS private client key. Absolute path to client key in PEM format. If set, .client_certificate must also be set. + # If omitted or null, mTLS is not used. client_key: ${OTEL_EXPORTER_OTLP_TRACES_CLIENT_KEY} - # Configure mTLS client certificate. + # Configure mTLS client certificate. Absolute path to certificate file. If set, .client_key must also be set. + # If omitted or null, mTLS is not used. client_certificate: ${OTEL_EXPORTER_OTLP_TRACES_CLIENT_CERTIFICATE} - # Configure compression. + # Configure compression. Values include: gzip, none. Implementations may support other compression algorithms. + # If omitted or null, none is used. compression: ${OTEL_EXPORTER_OTLP_TRACES_COMPRESSION:-gzip} # Configure max time (in milliseconds) to wait for each export. + # 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. headers_list: ${OTEL_EXPORTER_OTLP_TRACES_HEADERS} # Configure span limits. See also attribute_limits. limits: # Configure max attribute value size. Overrides .attribute_limits.attribute_value_length_limit. + # If omitted or null, there is no limit. attribute_value_length_limit: ${OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT} # Configure max attribute count. Overrides .attribute_limits.attribute_count_limit. + # If omitted or null, 128 is used. attribute_count_limit: ${OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT:-128} # Configure max span event count. + # If omitted or null, 128 is used. event_count_limit: ${OTEL_SPAN_EVENT_COUNT_LIMIT:-128} # Configure max span link count. + # If omitted or null, 128 is used. link_count_limit: ${OTEL_SPAN_LINK_COUNT_LIMIT:-128} # Configure max attributes per span event. + # If omitted or null, 128 is used. event_attribute_count_limit: ${OTEL_EVENT_ATTRIBUTE_COUNT_LIMIT:-128} # Configure max attributes per span link. + # If omitted or null, 128 is used. link_attribute_count_limit: ${OTEL_LINK_ATTRIBUTE_COUNT_LIMIT:-128} # Configure the sampler. + # If omitted, parent based sampler with a root of always_on is used. sampler: # Configure sampler to be parent_based. parent_based: # Configure root sampler. + # If omitted or null, always_on is used. root: # Configure sampler to be always_on. always_on: # Configure remote_parent_sampled sampler. + # If omitted or null, always_on is used. remote_parent_sampled: # Configure sampler to be always_on. always_on: # Configure remote_parent_not_sampled sampler. + # If omitted or null, always_off is used. remote_parent_not_sampled: # Configure sampler to be always_off. always_off: # Configure local_parent_sampled sampler. + # If omitted or null, always_on is used. local_parent_sampled: # Configure sampler to be always_on. always_on: # Configure local_parent_not_sampled sampler. + # If omitted or null, always_off is used. local_parent_not_sampled: # Configure sampler to be always_off. always_off: # Configure meter provider. +# If omitted, a noop meter provider is used. meter_provider: # Configure metric readers. readers: - # Configure a periodic metric reader. periodic: # Configure delay interval (in milliseconds) between start of two consecutive exports. + # If omitted or null, 60000 is used. interval: ${OTEL_METRIC_EXPORT_INTERVAL:-60000} # Configure maximum allowed time (in milliseconds) to export data. + # If omitted or null, 30000 is used. timeout: ${OTEL_METRIC_EXPORT_TIMEOUT:-30000} # Configure exporter. exporter: # Configure exporter to be OTLP. otlp: - # Configure protocol. + # Configure protocol. Values include: http/protobuf, http/json, grpc. protocol: ${OTEL_EXPORTER_OTLP_METRICS_PROTOCOL:-http/protobuf} # Configure endpoint. + # If .protocol is http/protobuf or http/json, the signal specific path must be included (i.e. http://localhost:4318/v1/{signal}). If .protocol is grpc, a path should not be included (i.e. http://localhost:4317). endpoint: ${OTEL_EXPORTER_OTLP_METRICS_ENDPOINT:-http://localhost:4318/v1/metrics} - # Configure certificate. + # Configure certificate. Absolute path to certificate file. + # If omitted or null, system default certificate verification is used for secure connections. certificate: ${OTEL_EXPORTER_OTLP_METRICS_CERTIFICATE} - # Configure mTLS private client key. + # Configure mTLS private client key. Absolute path to client key in PEM format. If set, .client_certificate must also be set. + # If omitted or null, mTLS is not used. client_key: ${OTEL_EXPORTER_OTLP_METRICS_CLIENT_KEY} - # Configure mTLS client certificate. + # Configure mTLS client certificate. Absolute path to certificate file. If set, .client_key must also be set. + # If omitted or null, mTLS is not used. client_certificate: ${OTEL_EXPORTER_OTLP_METRICS_CLIENT_CERTIFICATE} - # Configure compression. + # Configure compression. Values include: gzip, none. Implementations may support other compression algorithms. + # If omitted or null, none is used. compression: ${OTEL_EXPORTER_OTLP_METRICS_COMPRESSION:-gzip} # Configure max time (in milliseconds) to wait for each export. + # 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. headers_list: ${OTEL_EXPORTER_OTLP_METRICS_HEADERS} - # Configure temporality preference. + # 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. temporality_preference: ${OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE:-cumulative} - # Configure default histogram aggregation. + # 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. default_histogram_aggregation: ${OTEL_EXPORTER_OTLP_METRICS_DEFAULT_HISTOGRAM_AGGREGATION:-explicit_bucket_histogram} - # Configure the exemplar filter. Known values include: trace_based, always_on, always_off. + # 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. exemplar_filter: ${OTEL_METRICS_EXEMPLAR_FILTER:-trace_based} - # Configure logger provider. +# If omitted, a noop logger provider is used. logger_provider: # Configure log record processors. processors: - # Configure a batch log record processor. batch: # Configure delay interval (in milliseconds) between two consecutive exports. + # If omitted or null, 1000 is used. schedule_delay: ${OTEL_BLRP_SCHEDULE_DELAY:-1000} # Configure maximum allowed time (in milliseconds) to export data. + # If omitted or null, 30000 is used. export_timeout: ${OTEL_BLRP_EXPORT_TIMEOUT:-30000} # Configure maximum queue size. + # If omitted or null, 2048 is used. max_queue_size: ${OTEL_BLRP_MAX_QUEUE_SIZE:-2048} # Configure maximum batch size. + # If omitted or null, 512 is used. max_export_batch_size: ${OTEL_BLRP_MAX_EXPORT_BATCH_SIZE:-512} # Configure exporter. exporter: # Configure exporter to be OTLP. otlp: - # Configure protocol. + # Configure protocol. Values include: http/protobuf, http/json, grpc. protocol: ${OTEL_EXPORTER_OTLP_LOGS_PROTOCOL:-http/protobuf} # Configure endpoint. + # If .protocol is http/protobuf or http/json, the signal specific path must be included (i.e. http://localhost:4318/v1/{signal}). If .protocol is grpc, a path should not be included (i.e. http://localhost:4317). endpoint: ${OTEL_EXPORTER_OTLP_LOGS_ENDPOINT:-http://localhost:4318/v1/logs} - # Configure certificate. + # Configure certificate. Absolute path to certificate file. + # If omitted or null, system default certificate verification is used for secure connections. certificate: ${OTEL_EXPORTER_OTLP_LOGS_CERTIFICATE} - # Configure mTLS private client key. + # Configure mTLS private client key. Absolute path to client key in PEM format. If set, .client_certificate must also be set. + # If omitted or null, mTLS is not used. client_key: ${OTEL_EXPORTER_OTLP_LOGS_CLIENT_KEY} - # Configure mTLS client certificate. + # Configure mTLS client certificate. Absolute path to certificate file. If set, .client_key must also be set. + # If omitted or null, mTLS is not used. client_certificate: ${OTEL_EXPORTER_OTLP_LOGS_CLIENT_CERTIFICATE} - # Configure compression. + # Configure compression. Values include: gzip, none. Implementations may support other compression algorithms. + # If omitted or null, none is used. compression: ${OTEL_EXPORTER_OTLP_LOGS_COMPRESSION:-gzip} # Configure max time (in milliseconds) to wait for each export. + # 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. headers_list: ${OTEL_EXPORTER_OTLP_LOGS_HEADERS} # Configure log record limits. See also attribute_limits. limits: # Configure max attribute value size. Overrides .attribute_limits.attribute_value_length_limit. + # If omitted or null, there is no limit. attribute_value_length_limit: ${OTEL_LOGRECORD_ATTRIBUTE_VALUE_LENGTH_LIMIT} # Configure max attribute count. Overrides .attribute_limits.attribute_count_limit. + # If omitted or null, 128 is used. attribute_count_limit: ${OTEL_LOGRECORD_ATTRIBUTE_COUNT_LIMIT:-128} diff --git a/schema/common.json b/schema/common.json index b0609b5..fe1b8fd 100644 --- a/schema/common.json +++ b/schema/common.json @@ -2,7 +2,6 @@ "$id": "https://opentelemetry.io/otelconfig/common.json", "$schema": "https://json-schema.org/draft/2020-12/schema", "title": "Common", - "type": ["object", "null"], "$defs": { "IncludeExclude": { "type": "object", @@ -38,15 +37,15 @@ ] }, "Otlp": { - "type": ["object", "null"], + "type": "object", "additionalProperties": false, "properties": { "protocol": { - "type": ["string", "null"], + "type": "string", "pattern": "^(http|grpc)\\/(protobuf|json)" }, "endpoint": { - "type": ["string", "null"] + "type": "string" }, "certificate": { "type": ["string", "null"] diff --git a/schema/logger_provider.json b/schema/logger_provider.json index f05e248..afbcc8f 100644 --- a/schema/logger_provider.json +++ b/schema/logger_provider.json @@ -2,7 +2,7 @@ "$id": "https://opentelemetry.io/otelconfig/logger_provider.json", "$schema": "https://json-schema.org/draft/2020-12/schema", "title": "LoggerProvider", - "type": ["object", "null"], + "type": "object", "additionalProperties": false, "properties": { "processors": { @@ -15,9 +15,12 @@ "$ref": "#/$defs/LogRecordLimits" } }, + "required": [ + "processors" + ], "$defs": { "SimpleLogRecordProcessor": { - "type": ["object", "null"], + "type": "object", "additionalProperties": false, "properties": { "exporter": { @@ -29,7 +32,7 @@ ] }, "BatchLogRecordProcessor": { - "type": ["object", "null"], + "type": "object", "additionalProperties": false, "properties": { "schedule_delay": { @@ -57,7 +60,7 @@ ] }, "LogRecordExporter": { - "type": ["object", "null"], + "type": "object", "additionalProperties": true, "minProperties": 1, "maxProperties": 1, @@ -76,7 +79,7 @@ } }, "LogRecordLimits": { - "type": ["object", "null"], + "type": "object", "additionalProperties": false, "properties": { "attribute_value_length_limit": { @@ -90,7 +93,7 @@ } }, "LogRecordProcessor": { - "type": ["object", "null"], + "type": "object", "additionalProperties": true, "minProperties": 1, "maxProperties": 1, @@ -104,7 +107,7 @@ }, "patternProperties": { ".*": { - "type": ["object", "null"] + "type": ["object"] } } } diff --git a/schema/meter_provider.json b/schema/meter_provider.json index 1412123..16686a9 100644 --- a/schema/meter_provider.json +++ b/schema/meter_provider.json @@ -2,7 +2,7 @@ "$id": "https://opentelemetry.io/otelconfig/meter_provider.json", "$schema": "https://json-schema.org/draft/2020-12/schema", "title": "MeterProvider", - "type": ["object", "null"], + "type": "object", "additionalProperties": false, "properties": { "readers": { @@ -26,9 +26,12 @@ ] } }, + "required": [ + "readers" + ], "$defs": { "PeriodicMetricReader": { - "type": ["object", "null"], + "type": "object", "additionalProperties": false, "properties": { "interval": { @@ -49,7 +52,7 @@ "title": "PeriodicMetricReader" }, "PullMetricReader": { - "type": ["object", "null"], + "type": "object", "additionalProperties": false, "properties": { "exporter": { @@ -62,7 +65,7 @@ "title": "PullMetricReader" }, "PushMetricExporter": { - "type": ["object", "null"], + "type": "object", "additionalProperties": true, "minProperties": 1, "maxProperties": 1, @@ -81,7 +84,7 @@ } }, "PullMetricExporter": { - "type": ["object", "null"], + "type": ["object"], "additionalProperties": true, "minProperties": 1, "maxProperties": 1, @@ -138,7 +141,7 @@ } }, "MetricReader": { - "type": ["object", "null"], + "type": "object", "additionalProperties": false, "minProperties": 1, "maxProperties": 2, @@ -158,15 +161,15 @@ } }, "OtlpMetric": { - "type": ["object", "null"], + "type": "object", "additionalProperties": false, "properties": { "protocol": { - "type": ["string", "null"], + "type": "string", "pattern": "^(http|grpc)\\/(protobuf|json)" }, "endpoint": { - "type": ["string", "null"] + "type": "string" }, "certificate": { "type": ["string", "null"] @@ -194,7 +197,12 @@ "minimum": 0 }, "temporality_preference": { - "type": ["string", "null"] + "type": ["string", "null"], + "enum": [ + "cumulative", + "delta", + "low_memory" + ] }, "default_histogram_aggregation": { "type": ["string", "null"], @@ -214,12 +222,12 @@ "title": "OtlpMetric" }, "View": { - "type": ["object", "null"], + "type": "object", "additionalProperties": false, "properties": { "selector": { "title": "Selector", - "type": ["object", "null"], + "type": "object", "additionalProperties": false, "properties": { "instrument_name": { @@ -252,7 +260,7 @@ }, "stream": { "title": "Stream", - "type": ["object", "null"], + "type": "object", "additionalProperties": false, "properties": { "name": { @@ -262,7 +270,7 @@ "type": ["string", "null"] }, "aggregation": { - "type": ["object", "null"], + "type": "object", "additionalProperties": false, "minProperties": 1, "maxProperties": 1, diff --git a/schema/opentelemetry_configuration.json b/schema/opentelemetry_configuration.json index 2f955cb..2bd1a2b 100644 --- a/schema/opentelemetry_configuration.json +++ b/schema/opentelemetry_configuration.json @@ -2,11 +2,11 @@ "$id": "https://opentelemetry.io/otelconfig/opentelemetry_configuration.json", "$schema": "https://json-schema.org/draft/2020-12/schema", "title": "OpenTelemetryConfiguration", - "type": ["object", "null"], + "type": "object", "additionalProperties": true, "properties": { "file_format": { - "type": ["string", "null"] + "type": "string" }, "disabled": { "type": ["boolean", "null"] @@ -38,7 +38,7 @@ ], "$defs": { "AttributeLimits": { - "type": ["object", "null"], + "type": "object", "additionalProperties": true, "properties": { "attribute_value_length_limit": { diff --git a/schema/propagator.json b/schema/propagator.json index 64e2d51..a2bf235 100644 --- a/schema/propagator.json +++ b/schema/propagator.json @@ -2,16 +2,16 @@ "$id": "https://opentelemetry.io/otelconfig/propagator.json", "$schema": "https://json-schema.org/draft/2020-12/schema", "title": "Propagator", - "type": ["object", "null"], - "minProperties": 1, - "maxProperties": 1, - "additionalProperties": true, + "type": "object", "properties": { "composite": { "type": "array", "items": { - "type": ["string", "null"] + "type": ["string"] } } - } + }, + "required": [ + "composite" + ] } diff --git a/schema/resource.json b/schema/resource.json index f059603..b419546 100644 --- a/schema/resource.json +++ b/schema/resource.json @@ -2,7 +2,7 @@ "$id": "https://opentelemetry.io/otelconfig/resource.json", "$schema": "https://json-schema.org/draft/2020-12/schema", "title": "Resource", - "type": ["object", "null"], + "type": "object", "additionalProperties": false, "properties": { "attributes": { @@ -42,6 +42,7 @@ ] }, "type": { + "type": ["string", "null"], "enum": [ null, "string", @@ -65,23 +66,7 @@ "additionalProperties": false, "properties": { "attributes": { - "title": "DetectorAttributes", - "type": "object", - "additionalProperties": false, - "properties": { - "included": { - "type": "array", - "items": { - "type": "string" - } - }, - "excluded": { - "type": "array", - "items": { - "type": "string" - } - } - } + "$ref": "common.json#/$defs/IncludeExclude" } } } diff --git a/schema/tracer_provider.json b/schema/tracer_provider.json index 67c2c56..6e96886 100644 --- a/schema/tracer_provider.json +++ b/schema/tracer_provider.json @@ -2,7 +2,7 @@ "$id": "https://opentelemetry.io/otelconfig/tracer_provider.json", "$schema": "https://json-schema.org/draft/2020-12/schema", "title": "TracerProvider", - "type": ["object", "null"], + "type": "object", "additionalProperties": false, "properties": { "processors": { @@ -18,9 +18,12 @@ "$ref": "#/$defs/Sampler" } }, + "required": [ + "processors" + ], "$defs": { "BatchSpanProcessor": { - "type": ["object", "null"], + "type": "object", "additionalProperties": false, "title": "BatchSpanProcessor", "properties": { @@ -49,7 +52,7 @@ ] }, "Sampler": { - "type": ["object", "null"], + "type": "object", "additionalProperties": true, "minProperties": 1, "maxProperties": 1, @@ -104,7 +107,7 @@ "additionalProperties": false, "properties": { "ratio": { - "type": "number" + "type": ["number", "null"] } } } @@ -116,7 +119,7 @@ } }, "SimpleSpanProcessor": { - "type": ["object", "null"], + "type": "object", "additionalProperties": false, "title": "SimpleSpanProcessor", "properties": { @@ -129,7 +132,7 @@ ] }, "SpanExporter": { - "type": ["object", "null"], + "type": "object", "additionalProperties": true, "minProperties": 1, "maxProperties": 1, @@ -151,7 +154,7 @@ } }, "SpanLimits": { - "type": ["object", "null"], + "type": "object", "additionalProperties": false, "properties": { "attribute_value_length_limit": { @@ -181,7 +184,7 @@ } }, "SpanProcessor": { - "type": ["object", "null"], + "type": "object", "additionalProperties": true, "minProperties": 1, "maxProperties": 1, @@ -211,9 +214,6 @@ "minimum": 0 } }, - "required": [ - "endpoint" - ], "title": "Zipkin" } } diff --git a/schema/type_descriptions.yaml b/schema/type_descriptions.yaml index 6fc0041..149cc57 100644 --- a/schema/type_descriptions.yaml +++ b/schema/type_descriptions.yaml @@ -19,13 +19,31 @@ The yaml format is documented at https://github.com/open-telemetry/opentelemetry-configuration/tree/main/schema - disabled: Configure if the SDK is disabled or not. This is not required to be provided to ensure the SDK isn't disabled, the default value when this is not provided is for the SDK to be enabled. - resource: Configure resource for all signals. - propagator: Configure text map context propagators. + disabled: > + Configure if the SDK is disabled or not. + + If omitted or null, false is used. + resource: > + Configure resource for all signals. + + If omitted, the default resource is used. + propagator: > + Configure text map context propagators. + + If omitted, tracecontext and baggage are used. attribute_limits: Configure general attribute limits. See also tracer_provider.limits, logger_provider.limits. - logger_provider: Configure logger provider. - tracer_provider: Configure tracer provider. - meter_provider: Configure meter provider. + logger_provider: > + Configure logger provider. + + If omitted, a noop logger provider is used. + tracer_provider: > + Configure tracer provider. + + If omitted, a noop tracer provider is used. + meter_provider: > + Configure meter provider. + + If omitted, a noop meter provider is used. instrumentation: Configure instrumentation. path_patterns: - . @@ -35,13 +53,20 @@ attributes: > Configure resource attributes. Entries have higher priority than entries from .resource.attributes_list. - Entries must contain .name and .value, and may optionally include .type, which defaults to "string" if not set. The value must match the type. Values for .type include: string, bool, int, double, string_array, bool_array, int_array, double_array. + Entries must contain .name and .value, and may optionally include .type. If an entry's .type omitted or null, string is used. + + The .value's type must match the .type. Values for .type include: string, bool, int, double, string_array, bool_array, int_array, double_array. attributes_list: > 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. detectors: Configure resource detectors. - schema_url: Configure resource schema URL. + schema_url: > + Configure resource schema URL. + + If omitted or null, no schema URL is used. path_patterns: - .resource @@ -54,30 +79,39 @@ - type: DetectorAttributes property_descriptions: included: > - Configure list of attribute key patterns to include from resource detectors. If not set, all attributes are included. + Configure list of attribute key patterns to include from resource detectors. Attribute keys from resource detectors are evaluated to match as follows: * If the value of the attribute key exactly matches. * If the value of the attribute key matches the wildcard pattern, where '?' matches any single character and '*' matches any number of characters including none. + If omitted, all attributes are included. excluded: > Configure list of attribute key patterns to exclude from resource detectors. Applies after .resource.detectors.attributes.included (i.e. excluded has higher priority than included). Attribute keys from resource detectors are evaluated to match as follows: * If the value of the attribute key exactly matches. * If the value of the attribute key matches the wildcard pattern, where '?' matches any single character and '*' matches any number of characters including none. + If omitted, .included attributes are included. path_patterns: - .resource.detectors.attributes - type: AttributeLimits property_descriptions: - attribute_value_length_limit: Configure max attribute value size. - attribute_count_limit: Configure max attribute count. + attribute_value_length_limit: > + Configure max attribute value size. + + If omitted or null, there is no limit. + attribute_count_limit: > + Configure max attribute count. + + If omitted or null, 128 is used. path_patterns: - .attribute_limits - type: Propagator property_descriptions: - composite: Configure the set of propagators to include in the composite text map propagator. + composite: > + Configure the set of propagators to include in the composite text map propagator. Built-in values include: tracecontext, baggage, b3, b3multi, jaeger, none. Known third party values include: xray, ottrace. For behavior of values see https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/configuration/sdk-environment-variables.md#general-sdk-configuration. path_patterns: - .propagator # END OpenTelemetryConfiguration @@ -99,10 +133,22 @@ - type: BatchLogRecordProcessor property_descriptions: - schedule_delay: Configure delay interval (in milliseconds) between two consecutive exports. - export_timeout: Configure maximum allowed time (in milliseconds) to export data. - max_queue_size: Configure maximum queue size. - max_export_batch_size: Configure maximum batch size. + schedule_delay: > + Configure delay interval (in milliseconds) between two consecutive exports. + + If omitted or null, 1000 is used. + export_timeout: > + Configure maximum allowed time (in milliseconds) to export data. + + If omitted or null, 30000 is used. + max_queue_size: > + Configure maximum queue size. + + If omitted or null, 2048 is used. + max_export_batch_size: > + Configure maximum batch size. + + If omitted or null, 512 is used. exporter: Configure exporter. path_patterns: - .logger_provider.processors[].batch @@ -122,8 +168,14 @@ - type: LogRecordLimits property_descriptions: - attribute_value_length_limit: Configure max attribute value size. Overrides .attribute_limits.attribute_value_length_limit. - attribute_count_limit: Configure max attribute count. Overrides .attribute_limits.attribute_count_limit. + attribute_value_length_limit: > + Configure max attribute value size. Overrides .attribute_limits.attribute_value_length_limit. + + If omitted or null, there is no limit. + attribute_count_limit: > + Configure max attribute count. Overrides .attribute_limits.attribute_count_limit. + + If omitted or null, 128 is used. path_patterns: - .logger_provider.limits # END LoggerProvider @@ -133,7 +185,10 @@ property_descriptions: processors: Configure span processors. limits: Configure span limits. See also attribute_limits. - sampler: Configure the sampler. + sampler: > + Configure the sampler. + + If omitted, parent based sampler with a root of always_on is used. path_patterns: - .tracer_provider @@ -146,10 +201,22 @@ - type: BatchSpanProcessor property_descriptions: - schedule_delay: Configure delay interval (in milliseconds) between two consecutive exports. - export_timeout: Configure maximum allowed time (in milliseconds) to export data. - max_queue_size: Configure maximum queue size. - max_export_batch_size: Configure maximum batch size. + schedule_delay: > + Configure delay interval (in milliseconds) between two consecutive exports. + + If omitted or null, 5000 is used. + export_timeout: > + Configure maximum allowed time (in milliseconds) to export data. + + If omitted or null, 30000 is used. + max_queue_size: > + Configure maximum queue size. + + If omitted or null, 2048 is used. + max_export_batch_size: > + Configure maximum batch size. + + If omitted or null, 512 is used. exporter: Configure exporter. path_patterns: - .tracer_provider.processors[].batch @@ -170,19 +237,43 @@ - type: Zipkin property_descriptions: - endpoint: Configure endpoint. - timeout: Configure max time (in milliseconds) to wait for each export. + endpoint: > + Configure endpoint. + + If omitted or null, http://localhost:9411/api/v2/spans is used. + timeout: > + Configure max time (in milliseconds) to wait for each export. + + If omitted or null, 10000 is used. path_patterns: - .tracer_provider.processors[].*.exporter.zipkin - type: SpanLimits property_descriptions: - attribute_value_length_limit: Configure max attribute value size. Overrides .attribute_limits.attribute_value_length_limit. - attribute_count_limit: Configure max attribute count. Overrides .attribute_limits.attribute_count_limit. - event_count_limit: Configure max span event count. - link_count_limit: Configure max span link count. - event_attribute_count_limit: Configure max attributes per span event. - link_attribute_count_limit: Configure max attributes per span link. + attribute_value_length_limit: > + Configure max attribute value size. Overrides .attribute_limits.attribute_value_length_limit. + + If omitted or null, there is no limit. + attribute_count_limit: > + Configure max attribute count. Overrides .attribute_limits.attribute_count_limit. + + If omitted or null, 128 is used. + event_count_limit: > + Configure max span event count. + + If omitted or null, 128 is used. + link_count_limit: > + Configure max span link count. + + If omitted or null, 128 is used. + event_attribute_count_limit: > + Configure max attributes per span event. + + If omitted or null, 128 is used. + link_attribute_count_limit: > + Configure max attributes per span link. + + If omitted or null, 128 is used. path_patterns: - .tracer_provider.limits @@ -192,12 +283,30 @@ trace_id_ratio_based: Configure sampler to be trace_id_ratio_based. always_on: Configure sampler to be always_on. always_off: Configure sampler to be always_off. - root: Configure root sampler. - remote_parent_sampled: Configure remote_parent_sampled sampler. - remote_parent_not_sampled: Configure remote_parent_not_sampled sampler. - local_parent_sampled: Configure local_parent_sampled sampler. - local_parent_not_sampled: Configure local_parent_not_sampled sampler. - ratio: Configure trace_id_ratio. + root: > + Configure root sampler. + + If omitted or null, always_on is used. + remote_parent_sampled: > + Configure remote_parent_sampled sampler. + + If omitted or null, always_on is used. + remote_parent_not_sampled: > + Configure remote_parent_not_sampled sampler. + + If omitted or null, always_off is used. + local_parent_sampled: > + Configure local_parent_sampled sampler. + + If omitted or null, always_on is used. + local_parent_not_sampled: > + Configure local_parent_not_sampled sampler. + + If omitted or null, always_off is used. + ratio: > + Configure trace_id_ratio. + + If omitted or null, 1.0 is used. path_patterns: - .tracer_provider.sampler - .tracer_provider.sampler.* @@ -208,7 +317,10 @@ property_descriptions: readers: Configure metric readers. views: Configure views. Each view has a selector which determines the instrument(s) it applies to, and a configuration for the resulting stream(s). - exemplar_filter: "Configure the exemplar filter. Known values include: trace_based, always_on, always_off." + exemplar_filter: > + 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. path_patterns: - .meter_provider @@ -228,8 +340,14 @@ - type: PeriodicMetricReader property_descriptions: - interval: Configure delay interval (in milliseconds) between start of two consecutive exports. - timeout: Configure maximum allowed time (in milliseconds) to export data. + interval: > + Configure delay interval (in milliseconds) between start of two consecutive exports. + + If omitted or null, 60000 is used. + timeout: > + Configure maximum allowed time (in milliseconds) to export data. + + If omitted or null, 30000 is used. exporter: Configure exporter. path_patterns: - .meter_provider.readers[].periodic @@ -251,65 +369,113 @@ - type: Prometheus property_descriptions: - host: Configure host. - port: Configure port. - without_units: Configure Prometheus Exporter to produce metrics without a unit suffix or UNIT metadata. - without_type_suffix: Configure Prometheus Exporter to produce metrics without a type suffix. - without_scope_info: Configure Prometheus Exporter to produce metrics without a scope info metric. + host: > + Configure host. + + If omitted or null, localhost is used. + port: > + Configure port. + + If omitted or null, 9464 is used. + without_units: > + Configure Prometheus Exporter to produce metrics without a unit suffix or UNIT metadata. + + If omitted or null, false is used. + without_type_suffix: > + Configure Prometheus Exporter to produce metrics without a type suffix. + + If omitted or null, false is used. + without_scope_info: > + Configure Prometheus Exporter to produce metrics without a scope info metric. + + If omitted or null, false is used. with_resource_constant_labels: Configure Prometheus Exporter to add resource attributes as metrics attributes. path_patterns: - .meter_provider.readers[].pull.exporter.prometheus - type: PrometheusIncludeExclude property_descriptions: included: > - Configure resource attributes to be included. If not set, no resource attributes are included. + Configure resource attributes to be included. Attribute keys from resources are evaluated to match as follows: * If the value of the attribute key exactly matches. * If the value of the attribute key matches the wildcard pattern, where '?' matches any single character and '*' matches any number of characters including none. + If omitted, no resource attributes are included. excluded: > Configure resource attributes to be excluded. Applies after .with_resource_constant_labels.included (i.e. excluded has higher priority than included). Attribute keys from resources are evaluated to match as follows: * If the value of the attribute key exactly matches. * If the value of the attribute key matches the wildcard pattern, where '?' matches any single character and '*' matches any number of characters including none. + If omitted, .included resource attributes are included. path_patterns: - .meter_provider.readers[].pull.exporter.prometheus.with_resource_constant_labels - type: View property_descriptions: - selector: Configure view selector. + selector: Configure view selector. Selection criteria is additive as described in https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/metrics/sdk.md#instrument-selection-criteria. stream: Configure view stream. path_patterns: - .meter_provider.views[] - type: Selector property_descriptions: - instrument_name: Configure instrument name selection criteria. - instrument_type: Configure instrument type selection criteria. - unit: Configure the instrument unit selection criteria. - meter_name: Configure meter name selection criteria. - meter_version: Configure meter version selection criteria. - meter_schema_url: Configure meter schema url selection criteria. + instrument_name: > + Configure instrument name selection criteria. + + If omitted or null, all instrument names match. + instrument_type: > + Configure instrument type selection criteria. + + If omitted or null, all instrument types match. + unit: > + Configure the instrument unit selection criteria. + + If omitted or null, all instrument units match. + meter_name: > + Configure meter name selection criteria. + + If omitted or null, all meter names match. + meter_version: > + Configure meter version selection criteria. + + If omitted or null, all meter versions match. + meter_schema_url: > + Configure meter schema url selection criteria. + + If omitted or null, all meter schema URLs match. path_patterns: - .meter_provider.views[].selector - type: Stream property_descriptions: - name: Configure metric name of the resulting stream(s). - description: Configure metric description of the resulting stream(s). + name: > + Configure metric name of the resulting stream(s). + + If omitted or null, the instrument's original name is used. + description: > + Configure metric description of the resulting stream(s). + + If omitted or null, the instrument's origin description is used. aggregation: > - Configure aggregation of the resulting stream(s). Known values include: default, drop, explicit_bucket_histogram, base2_exponential_bucket_histogram, last_value, sum. - attribute_keys: Configure attribute keys retained in the resulting stream(s). + Configure aggregation of the resulting stream(s). Values include: default, drop, explicit_bucket_histogram, base2_exponential_bucket_histogram, last_value, sum. For behavior of values see https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/metrics/sdk.md#aggregation. + + If omitted, default is used. + attribute_keys: > + Configure attribute keys retained in the resulting stream(s). path_patterns: - .meter_provider.views[].stream - type: StreamIncludeExclude property_descriptions: included: > - Configure list of attribute keys to include in the resulting stream(s). All other attributes are dropped. If not set, stream attributes are not configured. + Configure list of attribute keys to include in the resulting stream(s). All other attributes are dropped. + + If omitted, all attributes are included. excluded: > Configure list of attribute keys to exclude from the resulting stream(s). Applies after .attribute_keys.included (i.e. excluded has higher priority than included). + + If omitted, .attribute_keys.included are included. path_patterns: - .meter_provider.views[].stream.attribute_keys @@ -321,8 +487,14 @@ - type: StreamAggregationExplicitBucketHistogram property_descriptions: - boundaries: Configure bucket boundaries. - record_min_max: Configure record min and max. + boundaries: > + 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: > + Configure record min and max. + + If omitted or null, true is used. path_patterns: - .meter_provider.views[].stream.aggregation.explicit_bucket_histogram # END meter_provider @@ -330,21 +502,54 @@ # START common - type: Otlp property_descriptions: - protocol: Configure protocol. - endpoint: Configure endpoint. - certificate: Configure certificate. - client_key: Configure mTLS private client key. - client_certificate: Configure mTLS client certificate. - headers: Configure headers. Entries have higher priority than entries from .headers_list. + protocol: > + Configure protocol. Values include: http/protobuf, http/json, grpc. + endpoint: > + Configure endpoint. + + If .protocol is http/protobuf or http/json, the signal specific path must be included (i.e. http://localhost:4318/v1/{signal}). If .protocol is grpc, a path should not be included (i.e. http://localhost:4317). + certificate: > + Configure certificate. Absolute path to certificate file. + + If omitted or null, system default certificate verification is used for secure connections. + client_key: > + Configure mTLS private client key. Absolute path to client key in PEM format. If set, .client_certificate must also be set. + + If omitted or null, mTLS is not used. + client_certificate: > + Configure mTLS client certificate. Absolute path to certificate file. If set, .client_key must also be set. + + If omitted or null, mTLS is not used. + headers: > + Configure headers. Entries have higher priority than entries from .headers_list. + + If an entry's .value is null, the entry is ignored. headers_list: > 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. - compression: Configure compression. - timeout: Configure max time (in milliseconds) to wait for each export. - insecure: Configure client transport security for the exporter's connection. - temporality_preference: Configure temporality preference. - default_histogram_aggregation: Configure default histogram aggregation. + + If omitted or null, no headers are added. + compression: > + Configure compression. Values include: gzip, none. Implementations may support other compression algorithms. + + If omitted or null, none is used. + timeout: > + Configure max time (in milliseconds) to wait for each export. + + If omitted or null, 10000 is used. + insecure: > + Configure client transport security for the exporter's connection. Only applicable when .protocol is grpc and .endpoint is provided without http or https scheme. Implementations may choose to ignore .insecure. + + If omitted or null, false is used. + temporality_preference: > + 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. + default_histogram_aggregation: > + 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. path_patterns: - .tracer_provider.processors[].*.exporter.otlp - .logger_provider.processors[].*.exporter.otlp diff --git a/scripts/generate-descriptions.js b/scripts/generate-descriptions.js index f3623a1..6dc47d2 100644 --- a/scripts/generate-descriptions.js +++ b/scripts/generate-descriptions.js @@ -116,8 +116,9 @@ yaml.visit(fileDoc, { node.key.commentBefore = formattedDescription; node.value.commentBefore = null; // yaml parser sometimes misidentifies a pair's commentBefore as the previously processed pair.value.comment - // we detect and fix that by keeping a reference to the previous node and looking for this case - if (prevLastNode !== null && prevLastNode.value.comment === formattedDescription) { + // we detect and fix that by keeping a reference to the previous node and setting the comment to null + // this works because we only use commentBefore in this project + if (prevLastNode !== null) { node.key.spaceBefore = null; prevLastNode.value.comment = null; }