diff --git a/.github/.lychee.toml b/.github/.lychee.toml index 6dea0efc..93915377 100644 --- a/.github/.lychee.toml +++ b/.github/.lychee.toml @@ -5,6 +5,9 @@ accept = ["200..=299", "403"] exclude = [ # excluding links to pull requests and issues is done for performance "^https://github.com/open-telemetry/opentelemetry-specification/(issues|pull)/\\d+$", + # exclude localhost, file references from schema-docs.md + "^http://localhost", + "^file://", # TODO (trask) look into this "^https://docs.google.com/document/d/1d0afxe3J6bQT-I6UbRXeIYNcTIyBQv4axfjKF4yvAPA/edit" ] diff --git a/.github/workflows/build-check.yaml b/.github/workflows/build-check.yaml index 1332dcae..ed29415f 100644 --- a/.github/workflows/build-check.yaml +++ b/.github/workflows/build-check.yaml @@ -25,19 +25,21 @@ jobs: - name: validate example run: make validate-examples - - name: generate descriptions - run: make generate-descriptions + - name: meta schema + run: make all-meta-schema - name: check for diff run: | # need to "git add" to detect any changes to descriptions which are not checked in - # select files from both /examples + # select files from locations managed by meta schema git add examples** + git add schema/meta_schema.yaml + git add schema-docs.md if git diff --cached --quiet then echo "No diff detected." else - echo "Diff detected - did you run 'make generate-descriptions'?" + echo "Diff detected - did you run 'make all-meta-schema'?" echo $(git diff --cached --name-only) echo $(git diff --cached) exit 1 diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index c70ff447..59dca2b4 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -91,9 +91,9 @@ tracer_provider: * `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 is _not_ required, it should include a [meta schema comment](./CONTRIBUTING.md#meta-schema) 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. +If a property `type` includes `null`, it must include a [meta schema comment](./CONTRIBUTING.md#meta-schema) 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. ### Polymorphic types @@ -247,37 +247,43 @@ You can perform all checks locally using this command: make all ``` -## Description generation - -The [./examples](./examples) directory contains a variety of examples, which -include important comments describing the semantics of the configuration -properties. In order to keep these comments consistent across examples, we have -tooling which automatically generates comments for each property. - -How it works: - -* The [./schema/type_descriptions.yaml](./schema/type_descriptions.yaml) file - defines descriptions for each of the properties of each type defines in - the [JSON schema](./schema) data model. -* The [./scripts/generate-descriptions.js](./scripts/generate-descriptions.js) is a - script which for a given input configuration file will: - * Parse the YAML. - * Walk through each key / value pair, and for each: - * Compute the JSON dot notation location of the current key / value pair. - * Find the first matching rule - in [type_description.yaml](./schema/type_descriptions.yaml). Iterate - through the rules and evaluate the key / value pair dot notation location - against each of the rule's `path_patterns`. - * Inject / overwrite comments for its properties according - to `type_descriptions.yaml`. - * Write the resulting content to specified output file or to the console. - -The `make generate-descriptions` command runs this process against each file -in `./examples` and overwrites each file in the process. - -**NOTE:** The [build](./.github/workflows/build-check.yaml) will fail -if `make generate-descriptions` produces any changes which are not checked into -version control. +## Meta schema + +[meta_schema.yaml](./schema/meta_schema.yaml) tracks schema details that don't fit neatly into the JSON schema including: + +* Property descriptions and semantics +* Track which types are SDK extension plugins +* Implementation support status (TODO) + +There are variety of tasks which intersect with the meta schema: + +### `make fix-meta-schema` + +Ensures that the JSON schema and the meta schema are kept in sync: + +* If a type exists in the JSON schema and not the meta schema, add it. +* If a type exists in the meta schema and not the JSON schema, delete it. +* For each meta schema type: + * If a property exists in the JSON schema and not the meta schema, add it. + * If a property exists in the meta schema and not the JSON schema, delete it. + +When this task adds new entries to the meta schema, they are stubbed out with `TODO` placeholders. Contributors should update these with sensible values. + +**NOTE:** This task is run as part of build automation. If it produces changes which are not checked into version control, the build will fail. + +### `make generate-markdown` + +Generates markdown at [schema-docs.md](./schema-docs.md) which summarizes a variety of useful information about JSON schema and meta schema in an easy to consume format. + +**NOTE:** This task is run as part of build automation. If it produces changes which are not checked into version control, the build will fail. + +### `make generate-descriptions` + +Annotates files in [./examples](./examples) with comments derived from the JSON schema and meta schema. + +The `/examples` directory contains a variety of examples which are expected to be used as starter templates and as references. The JSON schema is insufficient in describing the expected behavior of a given config file. It's missing key details describing behavior semantics (such as defaults) which are essential for both users and implementers. This task ensures that all examples are correctly and consistently commented. + +**NOTE:** This task is run as part of build automation. If it produces changes which are not checked into version control, the build will fail. To run against a single file: @@ -293,7 +299,7 @@ To run against a single file: ```bash npm install ``` - + - Run the script: ```shell @@ -308,6 +314,10 @@ rule, the previous description, the new description, etc. npm run-script generate-descriptions -- /absolute/path/to/input/file.yaml /absolute/path/to/output/file.yaml --debug ``` +### `make all-meta-schema` + +A composite task which runs all meta schema tasks. + ## Pull requests A PR is ready to merge when: diff --git a/Makefile b/Makefile index 783d77d7..4bbd6b68 100644 --- a/Makefile +++ b/Makefile @@ -27,6 +27,17 @@ validate-examples: || exit 1; \ done +.PHONY: update-file-format +update-file-format: + @echo "Updating \"file_format:\" in ./examples/* to: $(FILE_FORMAT)" + @for f in $(EXAMPLE_FILES); do \ + sed -e 's/file_format:.*/file_format: \"$(FILE_FORMAT)\"/g' -i '' ./examples/$$f; \ + done + +.PHONY: fix-meta-schema +fix-meta-schema: + npm run-script fix-meta-schema || exit 1; \ + .PHONY: generate-descriptions generate-descriptions: @if ! npm ls minimatch yaml; then npm install; fi @@ -34,12 +45,12 @@ generate-descriptions: npm run-script generate-descriptions -- $(shell pwd)/examples/$$f $(shell pwd)/examples/$$f || exit 1; \ done -.PHONY: update-file-format -update-file-format: - @echo "Updating \"file_format:\" in ./examples/* to: $(FILE_FORMAT)" - @for f in $(EXAMPLE_FILES); do \ - sed -e 's/file_format:.*/file_format: \"$(FILE_FORMAT)\"/g' -i '' ./examples/$$f; \ - done +.PHONY: generate-markdown +generate-markdown: + npm run-script generate-markdown || exit 1; \ + +.PHONY: all-meta-schema +all-meta-schema: fix-meta-schema generate-descriptions generate-markdown .PHONY: install-tools install-tools: diff --git a/examples/kitchen-sink.yaml b/examples/kitchen-sink.yaml index 2447b8a7..b5a292d4 100644 --- a/examples/kitchen-sink.yaml +++ b/examples/kitchen-sink.yaml @@ -50,8 +50,10 @@ logger_provider: exporter: # Configure exporter to be OTLP with HTTP transport. otlp_http: + # 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: http://localhost:4318/v1/logs - # Configure certificate used to verify a server's TLS credentials. + # Configure certificate used to verify a server's TLS credentials. # Absolute path to certificate file in PEM format. # If omitted or null, system default certificate verification is used for secure connections. certificate_file: /app/cert.pem @@ -59,14 +61,16 @@ logger_provider: # Absolute path to client key file in PEM format. If set, .client_certificate must also be set. # If omitted or null, mTLS is not used. client_key_file: /app/cert.pem - # Configure mTLS client certificate. + # Configure mTLS client certificate. # Absolute path to client certificate file in PEM format. If set, .client_key must also be set. # If omitted or null, mTLS is not used. client_certificate_file: /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 + - # The name of the pair. + name: api-key + # The value of the pair. 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. @@ -76,7 +80,7 @@ logger_provider: # 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. + # 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. timeout: 10000 @@ -93,7 +97,7 @@ logger_provider: # Configure endpoint. # If omitted or null, http://localhost:4317 is used. endpoint: http://localhost:4317 - # Configure certificate used to verify a server's TLS credentials. + # Configure certificate used to verify a server's TLS credentials. # Absolute path to certificate file in PEM format. # If omitted or null, system default certificate verification is used for secure connections. certificate_file: /app/cert.pem @@ -101,14 +105,16 @@ logger_provider: # Absolute path to client key file in PEM format. If set, .client_certificate must also be set. # If omitted or null, mTLS is not used. client_key_file: /app/cert.pem - # Configure mTLS client certificate. + # Configure mTLS client certificate. # Absolute path to client certificate file in PEM format. If set, .client_key must also be set. # If omitted or null, mTLS is not used. client_certificate_file: /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 + - # The name of the pair. + name: api-key + # The value of the pair. 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. @@ -118,7 +124,7 @@ logger_provider: # 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. + # 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. timeout: 10000 @@ -203,20 +209,20 @@ meter_provider: # 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. + # Configure Prometheus Exporter to add resource attributes as metrics attributes, where the resource attribute keys match the patterns. with_resource_constant_labels: - # 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. + # 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. 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. + # 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. excluded: - "service.attr1" # Configure how Prometheus metrics are exposed. Values include: @@ -273,10 +279,10 @@ meter_provider: exporter: # Configure exporter to be OTLP with HTTP transport. otlp_http: - # Configure endpoint, including the metric specific path. - # If omitted or null, http://localhost:4318/v1/metrics is used. + # 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: http://localhost:4318/v1/metrics - # Configure certificate used to verify a server's TLS credentials. + # Configure certificate used to verify a server's TLS credentials. # Absolute path to certificate file in PEM format. # If omitted or null, system default certificate verification is used for secure connections. certificate_file: /app/cert.pem @@ -284,14 +290,16 @@ meter_provider: # Absolute path to client key file in PEM format. If set, .client_certificate must also be set. # If omitted or null, mTLS is not used. client_key_file: /app/cert.pem - # Configure mTLS client certificate. + # Configure mTLS client certificate. # Absolute path to client certificate file in PEM format. If set, .client_key must also be set. # If omitted or null, mTLS is not used. client_certificate_file: /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 + - # The name of the pair. + name: api-key + # The value of the pair. 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. @@ -301,7 +309,7 @@ meter_provider: # 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. + # 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. timeout: 10000 @@ -309,18 +317,18 @@ meter_provider: # Values include: protobuf, json. Implementations may not support json. # If omitted or null, protobuf is used. encoding: protobuf - # 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: - - # Configure metric producer to be prometheus. - prometheus: + - # Configure metric producer to be opencensus. + opencensus: # Configure cardinality limits. cardinality_limits: # Configure default cardinality limit for all instrument types. @@ -357,7 +365,7 @@ meter_provider: # Configure endpoint. # If omitted or null, http://localhost:4317 is used. endpoint: http://localhost:4317 - # Configure certificate used to verify a server's TLS credentials. + # Configure certificate used to verify a server's TLS credentials. # Absolute path to certificate file in PEM format. # If omitted or null, system default certificate verification is used for secure connections. certificate_file: /app/cert.pem @@ -365,14 +373,16 @@ meter_provider: # Absolute path to client key file in PEM format. If set, .client_certificate must also be set. # If omitted or null, mTLS is not used. client_key_file: /app/cert.pem - # Configure mTLS client certificate. + # Configure mTLS client certificate. # Absolute path to client certificate file in PEM format. If set, .client_key must also be set. # If omitted or null, mTLS is not used. client_certificate_file: /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 + - # The name of the pair. + name: api-key + # The value of the pair. 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. @@ -382,7 +392,7 @@ meter_provider: # 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. + # 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. timeout: 10000 @@ -390,11 +400,11 @@ meter_provider: # Only applicable when .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 @@ -409,10 +419,12 @@ meter_provider: # Values include stdout, or scheme+destination. For example: file:///path/to/file.jsonl. # If omitted or null, stdout is used. output_stream: file:///var/log/metrics.jsonl - # 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. + # 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. 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. + # 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 a periodic metric reader. @@ -426,10 +438,12 @@ meter_provider: # Values include stdout, or scheme+destination. For example: file:///path/to/file.jsonl. # If omitted or null, stdout is used. output_stream: stdout - # 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. + # 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. 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. + # 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 a periodic metric reader. @@ -505,13 +519,19 @@ meter_provider: aggregation_cardinality_limit: 2000 # 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 omitted, all attributes are included. + # 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. 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. + # 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. excluded: - key3 # Configure the exemplar filter. @@ -585,10 +605,10 @@ tracer_provider: exporter: # Configure exporter to be OTLP with HTTP transport. otlp_http: - # Configure endpoint, including the trace specific path. - # If omitted or null, http://localhost:4318/v1/traces is used. + # 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: http://localhost:4318/v1/traces - # Configure certificate used to verify a server's TLS credentials. + # Configure certificate used to verify a server's TLS credentials. # Absolute path to certificate file in PEM format. # If omitted or null, system default certificate verification is used for secure connections. certificate_file: /app/cert.pem @@ -596,14 +616,16 @@ tracer_provider: # Absolute path to client key file in PEM format. If set, .client_certificate must also be set. # If omitted or null, mTLS is not used. client_key_file: /app/cert.pem - # Configure mTLS client certificate. + # Configure mTLS client certificate. # Absolute path to client certificate file in PEM format. If set, .client_key must also be set. # If omitted or null, mTLS is not used. client_certificate_file: /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 + - # The name of the pair. + name: api-key + # The value of the pair. 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. @@ -613,7 +635,7 @@ tracer_provider: # 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. + # 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. timeout: 10000 @@ -630,7 +652,7 @@ tracer_provider: # Configure endpoint. # If omitted or null, http://localhost:4317 is used. endpoint: http://localhost:4317 - # Configure certificate used to verify a server's TLS credentials. + # Configure certificate used to verify a server's TLS credentials. # Absolute path to certificate file in PEM format. # If omitted or null, system default certificate verification is used for secure connections. certificate_file: /app/cert.pem @@ -638,14 +660,16 @@ tracer_provider: # Absolute path to client key file in PEM format. If set, .client_certificate must also be set. # If omitted or null, mTLS is not used. client_key_file: /app/cert.pem - # Configure mTLS client certificate. + # Configure mTLS client certificate. # Absolute path to client certificate file in PEM format. If set, .client_key must also be set. # If omitted or null, mTLS is not used. client_certificate_file: /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 + - # The name of the pair. + name: api-key + # The value of the pair. 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. @@ -655,7 +679,7 @@ tracer_provider: # 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. + # 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. timeout: 10000 @@ -785,34 +809,83 @@ tracer_provider: # 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. 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 + - # The attribute name. + name: service.name + # The attribute value. + # The type of value must match .type. value: unknown_service - - name: string_key + - # The attribute name. + name: string_key + # The attribute value. + # The type of value must match .type. value: value + # The attribute type. + # Values include: string, bool, int, double, string_array, bool_array, int_array, double_array. + # If omitted or null, string is used. type: string - - name: bool_key + - # The attribute name. + name: bool_key + # The attribute value. + # The type of value must match .type. value: true + # The attribute type. + # Values include: string, bool, int, double, string_array, bool_array, int_array, double_array. + # If omitted or null, string is used. type: bool - - name: int_key + - # The attribute name. + name: int_key + # The attribute value. + # The type of value must match .type. value: 1 + # The attribute type. + # Values include: string, bool, int, double, string_array, bool_array, int_array, double_array. + # If omitted or null, string is used. type: int - - name: double_key + - # The attribute name. + name: double_key + # The attribute value. + # The type of value must match .type. value: 1.1 + # The attribute type. + # Values include: string, bool, int, double, string_array, bool_array, int_array, double_array. + # If omitted or null, string is used. type: double - - name: string_array_key + - # The attribute name. + name: string_array_key + # The attribute value. + # The type of value must match .type. value: [ "value1", "value2" ] + # The attribute type. + # Values include: string, bool, int, double, string_array, bool_array, int_array, double_array. + # If omitted or null, string is used. type: string_array - - name: bool_array_key + - # The attribute name. + name: bool_array_key + # The attribute value. + # The type of value must match .type. value: [ true, false ] + # The attribute type. + # Values include: string, bool, int, double, string_array, bool_array, int_array, double_array. + # If omitted or null, string is used. type: bool_array - - name: int_array_key + - # The attribute name. + name: int_array_key + # The attribute value. + # The type of value must match .type. value: [ 1, 2 ] + # The attribute type. + # Values include: string, bool, int, double, string_array, bool_array, int_array, double_array. + # If omitted or null, string is used. type: int_array - - name: double_array_key + - # The attribute name. + name: double_array_key + # The attribute value. + # The type of value must match .type. value: [ 1.1, 2.2 ] + # The attribute type. + # Values include: string, bool, int, double, string_array, bool_array, int_array, double_array. + # If omitted or null, string is used. 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. @@ -824,17 +897,17 @@ resource: detection/development: # Configure attributes provided by resource detectors. attributes: - # 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. + # 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. 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. + # 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. excluded: - process.command_args @@ -863,12 +936,15 @@ instrumentation/development: # See peer semantic conventions: https://opentelemetry.io/docs/specs/semconv/attributes-registry/peer/ peer: # Configure the service mapping for instrumentations following peer.service semantic conventions. - # Each entry is a key value pair where "peer" defines the IP address and "service" defines the corresponding logical name of the service. # See peer.service semantic conventions: https://opentelemetry.io/docs/specs/semconv/general/attributes/#general-remote-service-attributes service_mapping: - - peer: 1.2.3.4 + - # The IP address to map. + peer: 1.2.3.4 + # The logical name corresponding to the IP address of .peer. service: FooService - - peer: 2.3.4.5 + - # The IP address to map. + peer: 2.3.4.5 + # The logical name corresponding to the IP address of .peer. service: BarService # Configure instrumentations following the http semantic conventions. # See http semantic conventions: https://opentelemetry.io/docs/specs/semconv/http/ @@ -879,7 +955,7 @@ instrumentation/development: request_captured_headers: - Content-Type - Accept - # Configure headers to capture for outbound http responses. + # Configure headers to capture for inbound http responses. response_captured_headers: - Content-Type - Content-Encoding @@ -895,56 +971,55 @@ instrumentation/development: - Content-Encoding # Configure C++ language-specific instrumentation libraries. cpp: - # Configure the instrumentation corresponding to key "example". example: property: "value" # Configure .NET language-specific instrumentation libraries. + # Each entry's key identifies a particular instrumentation library. The corresponding value configures it. dotnet: - # Configure the instrumentation corresponding to key "example". example: property: "value" # Configure Erlang language-specific instrumentation libraries. + # Each entry's key identifies a particular instrumentation library. The corresponding value configures it. erlang: - # Configure the instrumentation corresponding to key "example". example: property: "value" # Configure Go language-specific instrumentation libraries. + # Each entry's key identifies a particular instrumentation library. The corresponding value configures it. go: - # Configure the instrumentation corresponding to key "example". example: property: "value" # Configure Java language-specific instrumentation libraries. + # Each entry's key identifies a particular instrumentation library. The corresponding value configures it. java: - # Configure the instrumentation corresponding to key "example". example: property: "value" # Configure JavaScript language-specific instrumentation libraries. + # Each entry's key identifies a particular instrumentation library. The corresponding value configures it. js: - # Configure the instrumentation corresponding to key "example". example: property: "value" # Configure PHP language-specific instrumentation libraries. + # Each entry's key identifies a particular instrumentation library. The corresponding value configures it. php: - # Configure the instrumentation corresponding to key "example". example: property: "value" # Configure Python language-specific instrumentation libraries. + # Each entry's key identifies a particular instrumentation library. The corresponding value configures it. python: - # Configure the instrumentation corresponding to key "example". example: property: "value" # Configure Ruby language-specific instrumentation libraries. + # Each entry's key identifies a particular instrumentation library. The corresponding value configures it. ruby: - # Configure the instrumentation corresponding to key "example". example: property: "value" # Configure Rust language-specific instrumentation libraries. + # Each entry's key identifies a particular instrumentation library. The corresponding value configures it. rust: - # Configure the instrumentation corresponding to key "example". example: property: "value" # Configure Swift language-specific instrumentation libraries. + # Each entry's key identifies a particular instrumentation library. The corresponding value configures it. swift: - # Configure the instrumentation corresponding to key "example". example: property: "value" diff --git a/examples/sdk-config.yaml b/examples/sdk-config.yaml index 9269a266..7e915401 100644 --- a/examples/sdk-config.yaml +++ b/examples/sdk-config.yaml @@ -19,10 +19,11 @@ log_level: info # 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. 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 + - # The attribute name. + name: service.name + # The attribute value. + # The type of value must match .type. value: unknown_service # Configure general attribute limits. See also tracer_provider.limits, logger_provider.limits. attribute_limits: @@ -70,10 +71,10 @@ tracer_provider: exporter: # Configure exporter to be OTLP with HTTP transport. otlp_http: - # Configure endpoint, including the trace specific path. - # If omitted or null, http://localhost:4318/v1/traces is used. + # 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: http://localhost:4318/v1/traces - # Configure certificate used to verify a server's TLS credentials. + # Configure certificate used to verify a server's TLS credentials. # Absolute path to certificate file in PEM format. # If omitted or null, system default certificate verification is used for secure connections. certificate_file: @@ -81,7 +82,7 @@ tracer_provider: # Absolute path to client key file in PEM format. If set, .client_certificate must also be set. # If omitted or null, mTLS is not used. client_key_file: - # Configure mTLS client certificate. + # Configure mTLS client certificate. # Absolute path to client certificate file in PEM format. If set, .client_key must also be set. # If omitted or null, mTLS is not used. client_certificate_file: @@ -89,7 +90,7 @@ tracer_provider: # 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. + # 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. timeout: 10000 @@ -171,10 +172,10 @@ meter_provider: exporter: # Configure exporter to be OTLP with HTTP transport. otlp_http: - # Configure endpoint, including the metric specific path. - # If omitted or null, http://localhost:4318/v1/metrics is used. + # 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: http://localhost:4318/v1/metrics - # Configure certificate used to verify a server's TLS credentials. + # Configure certificate used to verify a server's TLS credentials. # Absolute path to certificate file in PEM format. # If omitted or null, system default certificate verification is used for secure connections. certificate_file: @@ -182,7 +183,7 @@ meter_provider: # Absolute path to client key file in PEM format. If set, .client_certificate must also be set. # If omitted or null, mTLS is not used. client_key_file: - # Configure mTLS client certificate. + # Configure mTLS client certificate. # Absolute path to client certificate file in PEM format. If set, .client_key must also be set. # If omitted or null, mTLS is not used. client_certificate_file: @@ -190,18 +191,18 @@ meter_provider: # 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. + # 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. 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 @@ -234,8 +235,10 @@ logger_provider: exporter: # Configure exporter to be OTLP with HTTP transport. otlp_http: + # 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: http://localhost:4318/v1/logs - # Configure certificate used to verify a server's TLS credentials. + # Configure certificate used to verify a server's TLS credentials. # Absolute path to certificate file in PEM format. # If omitted or null, system default certificate verification is used for secure connections. certificate_file: @@ -243,7 +246,7 @@ logger_provider: # Absolute path to client key file in PEM format. If set, .client_certificate must also be set. # If omitted or null, mTLS is not used. client_key_file: - # Configure mTLS client certificate. + # Configure mTLS client certificate. # Absolute path to client certificate file in PEM format. If set, .client_key must also be set. # If omitted or null, mTLS is not used. client_certificate_file: @@ -251,7 +254,7 @@ logger_provider: # 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. + # 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. timeout: 10000 diff --git a/examples/sdk-migration-config.yaml b/examples/sdk-migration-config.yaml index 1d1f88bc..3a01b70b 100644 --- a/examples/sdk-migration-config.yaml +++ b/examples/sdk-migration-config.yaml @@ -46,10 +46,11 @@ log_level: ${OTEL_LOG_LEVEL:-info} # 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. 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 + - # The attribute name. + name: service.name + # The attribute value. + # The type of value must match .type. 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. @@ -102,10 +103,10 @@ tracer_provider: exporter: # Configure exporter to be OTLP with HTTP transport. otlp_http: - # Configure endpoint, including the trace specific path. - # If omitted or null, http://localhost:4318/v1/traces is used. + # 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: ${OTEL_EXPORTER_OTLP_TRACES_ENDPOINT:-http://localhost:4318/v1/traces} - # Configure certificate used to verify a server's TLS credentials. + # Configure certificate used to verify a server's TLS credentials. # Absolute path to certificate file in PEM format. # If omitted or null, system default certificate verification is used for secure connections. certificate_file: ${OTEL_EXPORTER_OTLP_TRACES_CERTIFICATE} @@ -113,7 +114,7 @@ tracer_provider: # Absolute path to client key file in PEM format. If set, .client_certificate must also be set. # If omitted or null, mTLS is not used. client_key_file: ${OTEL_EXPORTER_OTLP_TRACES_CLIENT_KEY} - # Configure mTLS client certificate. + # Configure mTLS client certificate. # Absolute path to client certificate file in PEM format. If set, .client_key must also be set. # If omitted or null, mTLS is not used. client_certificate_file: ${OTEL_EXPORTER_OTLP_TRACES_CLIENT_CERTIFICATE} @@ -121,7 +122,7 @@ tracer_provider: # 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. + # 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. timeout: ${OTEL_EXPORTER_OTLP_TRACES_TIMEOUT:-10000} @@ -209,10 +210,10 @@ meter_provider: exporter: # Configure exporter to be OTLP with HTTP transport. otlp_http: - # Configure endpoint, including the metric specific path. - # If omitted or null, http://localhost:4318/v1/metrics is used. + # 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: ${OTEL_EXPORTER_OTLP_METRICS_ENDPOINT:-http://localhost:4318/v1/metrics} - # Configure certificate used to verify a server's TLS credentials. + # Configure certificate used to verify a server's TLS credentials. # Absolute path to certificate file in PEM format. # If omitted or null, system default certificate verification is used for secure connections. certificate_file: ${OTEL_EXPORTER_OTLP_METRICS_CERTIFICATE} @@ -220,7 +221,7 @@ meter_provider: # Absolute path to client key file in PEM format. If set, .client_certificate must also be set. # If omitted or null, mTLS is not used. client_key_file: ${OTEL_EXPORTER_OTLP_METRICS_CLIENT_KEY} - # Configure mTLS client certificate. + # Configure mTLS client certificate. # Absolute path to client certificate file in PEM format. If set, .client_key must also be set. # If omitted or null, mTLS is not used. client_certificate_file: ${OTEL_EXPORTER_OTLP_METRICS_CLIENT_CERTIFICATE} @@ -228,7 +229,7 @@ meter_provider: # 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. + # 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. timeout: ${OTEL_EXPORTER_OTLP_METRICS_TIMEOUT:-10000} @@ -239,11 +240,11 @@ meter_provider: # 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} @@ -276,8 +277,10 @@ logger_provider: exporter: # Configure exporter to be OTLP with HTTP transport. otlp_http: + # 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: ${OTEL_EXPORTER_OTLP_LOGS_ENDPOINT:-http://localhost:4318/v1/logs} - # Configure certificate used to verify a server's TLS credentials. + # Configure certificate used to verify a server's TLS credentials. # Absolute path to certificate file in PEM format. # If omitted or null, system default certificate verification is used for secure connections. certificate_file: ${OTEL_EXPORTER_OTLP_LOGS_CERTIFICATE} @@ -285,7 +288,7 @@ logger_provider: # Absolute path to client key file in PEM format. If set, .client_certificate must also be set. # If omitted or null, mTLS is not used. client_key_file: ${OTEL_EXPORTER_OTLP_LOGS_CLIENT_KEY} - # Configure mTLS client certificate. + # Configure mTLS client certificate. # Absolute path to client certificate file in PEM format. If set, .client_key must also be set. # If omitted or null, mTLS is not used. client_certificate_file: ${OTEL_EXPORTER_OTLP_LOGS_CLIENT_CERTIFICATE} @@ -293,7 +296,7 @@ logger_provider: # 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. + # 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. timeout: ${OTEL_EXPORTER_OTLP_LOGS_TIMEOUT:-10000} diff --git a/package.json b/package.json index 196f7ae1..e5eae167 100644 --- a/package.json +++ b/package.json @@ -1,9 +1,12 @@ { + "type": "module", "scripts": { - "generate-descriptions": "node scripts/generate-descriptions.js" + "generate-descriptions": "node scripts/generate-descriptions.js", + "generate-markdown": "node scripts/generate-markdown.js", + "fix-meta-schema": "node scripts/fix-meta-schema.js" }, "devDependencies": { - "ajv-cli": "5.0.0" + "ajv-cli": "^5.0.0" }, "dependencies": { "envsub": "^4.1.0", diff --git a/schema-docs.md b/schema-docs.md new file mode 100644 index 00000000..6742450d --- /dev/null +++ b/schema-docs.md @@ -0,0 +1,5595 @@ + + +* [Overview](#overview) +* [Types](#types) + * [Aggregation](#aggregation) + * [AlwaysOffSampler](#alwaysoffsampler) + * [AlwaysOnSampler](#alwaysonsampler) + * [AttributeLimits](#attributelimits) + * [AttributeNameValue](#attributenamevalue) + * [AttributeType](#attributetype) + * [B3MultiPropagator](#b3multipropagator) + * [B3Propagator](#b3propagator) + * [BaggagePropagator](#baggagepropagator) + * [Base2ExponentialBucketHistogramAggregation](#base2exponentialbuckethistogramaggregation) + * [BatchLogRecordProcessor](#batchlogrecordprocessor) + * [BatchSpanProcessor](#batchspanprocessor) + * [CardinalityLimits](#cardinalitylimits) + * [ConsoleExporter](#consoleexporter) + * [DefaultAggregation](#defaultaggregation) + * [DropAggregation](#dropaggregation) + * [ExemplarFilter](#exemplarfilter) + * [ExperimentalContainerResourceDetector](#experimentalcontainerresourcedetector) + * [ExperimentalGeneralInstrumentation](#experimentalgeneralinstrumentation) + * [ExperimentalHostResourceDetector](#experimentalhostresourcedetector) + * [ExperimentalHttpClientInstrumentation](#experimentalhttpclientinstrumentation) + * [ExperimentalHttpInstrumentation](#experimentalhttpinstrumentation) + * [ExperimentalHttpServerInstrumentation](#experimentalhttpserverinstrumentation) + * [ExperimentalInstrumentation](#experimentalinstrumentation) + * [ExperimentalLanguageSpecificInstrumentation](#experimentallanguagespecificinstrumentation) + * [ExperimentalLoggerConfig](#experimentalloggerconfig) + * [ExperimentalLoggerConfigurator](#experimentalloggerconfigurator) + * [ExperimentalLoggerMatcherAndConfig](#experimentalloggermatcherandconfig) + * [ExperimentalMeterConfig](#experimentalmeterconfig) + * [ExperimentalMeterConfigurator](#experimentalmeterconfigurator) + * [ExperimentalMeterMatcherAndConfig](#experimentalmetermatcherandconfig) + * [ExperimentalOtlpFileExporter](#experimentalotlpfileexporter) + * [ExperimentalOtlpFileMetricExporter](#experimentalotlpfilemetricexporter) + * [ExperimentalPeerInstrumentation](#experimentalpeerinstrumentation) + * [ExperimentalPeerServiceMapping](#experimentalpeerservicemapping) + * [ExperimentalProcessResourceDetector](#experimentalprocessresourcedetector) + * [ExperimentalPrometheusMetricExporter](#experimentalprometheusmetricexporter) + * [ExperimentalResourceDetection](#experimentalresourcedetection) + * [ExperimentalResourceDetector](#experimentalresourcedetector) + * [ExperimentalServiceResourceDetector](#experimentalserviceresourcedetector) + * [ExperimentalTracerConfig](#experimentaltracerconfig) + * [ExperimentalTracerConfigurator](#experimentaltracerconfigurator) + * [ExperimentalTracerMatcherAndConfig](#experimentaltracermatcherandconfig) + * [ExplicitBucketHistogramAggregation](#explicitbuckethistogramaggregation) + * [ExporterDefaultHistogramAggregation](#exporterdefaulthistogramaggregation) + * [ExporterTemporalityPreference](#exportertemporalitypreference) + * [IncludeExclude](#includeexclude) + * [InstrumentType](#instrumenttype) + * [JaegerPropagator](#jaegerpropagator) + * [JaegerRemoteSampler](#jaegerremotesampler) + * [LastValueAggregation](#lastvalueaggregation) + * [LoggerProvider](#loggerprovider) + * [LogRecordExporter](#logrecordexporter) + * [LogRecordLimits](#logrecordlimits) + * [LogRecordProcessor](#logrecordprocessor) + * [MeterProvider](#meterprovider) + * [MetricProducer](#metricproducer) + * [MetricReader](#metricreader) + * [NameStringValuePair](#namestringvaluepair) + * [OpenCensusMetricProducer](#opencensusmetricproducer) + * [OpentelemetryConfiguration](#opentelemetryconfiguration) + * [OpenTracingPropagator](#opentracingpropagator) + * [OtlpGrpcExporter](#otlpgrpcexporter) + * [OtlpGrpcMetricExporter](#otlpgrpcmetricexporter) + * [OtlpHttpEncoding](#otlphttpencoding) + * [OtlpHttpExporter](#otlphttpexporter) + * [OtlpHttpMetricExporter](#otlphttpmetricexporter) + * [ParentBasedSampler](#parentbasedsampler) + * [PeriodicMetricReader](#periodicmetricreader) + * [Propagator](#propagator) + * [PullMetricExporter](#pullmetricexporter) + * [PullMetricReader](#pullmetricreader) + * [PushMetricExporter](#pushmetricexporter) + * [Resource](#resource) + * [Sampler](#sampler) + * [SimpleLogRecordProcessor](#simplelogrecordprocessor) + * [SimpleSpanProcessor](#simplespanprocessor) + * [SpanExporter](#spanexporter) + * [SpanLimits](#spanlimits) + * [SpanProcessor](#spanprocessor) + * [SumAggregation](#sumaggregation) + * [TextMapPropagator](#textmappropagator) + * [TraceContextPropagator](#tracecontextpropagator) + * [TraceIdRatioBasedSampler](#traceidratiobasedsampler) + * [TracerProvider](#tracerprovider) + * [View](#view) + * [ViewSelector](#viewselector) + * [ViewStream](#viewstream) + * [ZipkinSpanExporter](#zipkinspanexporter) +* [SDK Extension Plugins](#sdk-extension-plugins) + + +# Overview + +TODO +# Types + +## Aggregation + +| Property | Type | Required? | Constraints | Description | +|---|---|---|---|---| +| `default` | [`DefaultAggregation`](#defaultaggregation) | `false` | No constraints. | TODO | +| `drop` | [`DropAggregation`](#dropaggregation) | `false` | No constraints. | TODO | +| `explicit_bucket_histogram` | [`ExplicitBucketHistogramAggregation`](#explicitbuckethistogramaggregation) | `false` | No constraints. | Configure aggregation to be explicit_bucket_histogram. | +| `base2_exponential_bucket_histogram` | [`Base2ExponentialBucketHistogramAggregation`](#base2exponentialbuckethistogramaggregation) | `false` | No constraints. | TODO | +| `last_value` | [`LastValueAggregation`](#lastvalueaggregation) | `false` | No constraints. | TODO | +| `sum` | [`SumAggregation`](#sumaggregation) | `false` | No constraints. | TODO | + +Constraints: + +* `additionalProperties`: `false` +* `minProperties`: `1` +* `maxProperties`: `1` + +Usages: + +* [`ViewStream.aggregation`](#viewstream) + +
+JSON Schema + +[JSON Schema Source File](./schema/meter_provider.json) +
{
+  "type": "object",
+  "additionalProperties": false,
+  "minProperties": 1,
+  "maxProperties": 1,
+  "properties": {
+    "default": {
+      "$ref": "#/$defs/DefaultAggregation"
+    },
+    "drop": {
+      "$ref": "#/$defs/DropAggregation"
+    },
+    "explicit_bucket_histogram": {
+      "$ref": "#/$defs/ExplicitBucketHistogramAggregation"
+    },
+    "base2_exponential_bucket_histogram": {
+      "$ref": "#/$defs/Base2ExponentialBucketHistogramAggregation"
+    },
+    "last_value": {
+      "$ref": "#/$defs/LastValueAggregation"
+    },
+    "sum": {
+      "$ref": "#/$defs/SumAggregation"
+    }
+  }
+}
+
+ +## AlwaysOffSampler + +No properties. + +Constraints: + +* `additionalProperties`: `false` + +Usages: + +* [`Sampler.always_off`](#sampler) + +
+JSON Schema + +[JSON Schema Source File](./schema/tracer_provider.json) +
{
+  "type": [
+    "object",
+    "null"
+  ],
+  "additionalProperties": false
+}
+
+ +## AlwaysOnSampler + +No properties. + +Constraints: + +* `additionalProperties`: `false` + +Usages: + +* [`Sampler.always_on`](#sampler) + +
+JSON Schema + +[JSON Schema Source File](./schema/tracer_provider.json) +
{
+  "type": [
+    "object",
+    "null"
+  ],
+  "additionalProperties": false
+}
+
+ +## AttributeLimits + +| Property | Type | Required? | Constraints | Description | +|---|---|---|---|---| +| `attribute_value_length_limit` | one of:
* `integer`
* `null`
| `false` | No constraints. | Configure max attribute value size.
Value must be non-negative.
If omitted or null, there is no limit.
| +| `attribute_count_limit` | one of:
* `integer`
* `null`
| `false` | No constraints. | Configure max attribute count.
Value must be non-negative.
If omitted or null, 128 is used.
| + +Constraints: + +* `additionalProperties`: `true` + +Usages: + +* [`OpentelemetryConfiguration.attribute_limits`](#opentelemetryconfiguration) + +
+JSON Schema + +[JSON Schema Source File](./schema/opentelemetry_configuration.json) +
{
+  "type": "object",
+  "additionalProperties": true,
+  "properties": {
+    "attribute_value_length_limit": {
+      "type": [
+        "integer",
+        "null"
+      ]
+    },
+    "attribute_count_limit": {
+      "type": [
+        "integer",
+        "null"
+      ]
+    }
+  }
+}
+
+ +## AttributeNameValue + +| Property | Type | Required? | Constraints | Description | +|---|---|---|---|---| +| `name` | `string` | `true` | No constraints. | The attribute name.
| +| `value` | `oneOf` | `true` | No constraints. | The attribute value.
The type of value must match .type.
| +| `type` | [`AttributeType`](#attributetype) | `false` | No constraints. | The attribute type.
Values include: string, bool, int, double, string_array, bool_array, int_array, double_array.
If omitted or null, string is used.
| + +Constraints: + +* `additionalProperties`: `false` +* `required`: `["name","value"]` + +Usages: + +* [`Resource.attributes`](#resource) + +
+JSON Schema + +[JSON Schema Source File](./schema/resource.json) +
{
+  "type": "object",
+  "additionalProperties": false,
+  "properties": {
+    "name": {
+      "type": "string"
+    },
+    "value": {
+      "oneOf": [
+        {
+          "type": "string"
+        },
+        {
+          "type": "number"
+        },
+        {
+          "type": "boolean"
+        },
+        {
+          "type": "null"
+        },
+        {
+          "type": "array",
+          "items": {
+            "type": "string"
+          }
+        },
+        {
+          "type": "array",
+          "items": {
+            "type": "boolean"
+          }
+        },
+        {
+          "type": "array",
+          "items": {
+            "type": "number"
+          }
+        }
+      ]
+    },
+    "type": {
+      "$ref": "#/$defs/AttributeType"
+    }
+  },
+  "required": [
+    "name",
+    "value"
+  ]
+}
+
+ +## AttributeType + +No properties. + +Constraints: + +* `enum`: `[null,"string","bool","int","double","string_array","bool_array","int_array","double_array"]` + +Usages: + +* [`AttributeNameValue.type`](#attributenamevalue) + +
+JSON Schema + +[JSON Schema Source File](./schema/resource.json) +
{
+  "type": [
+    "string",
+    "null"
+  ],
+  "enum": [
+    null,
+    "string",
+    "bool",
+    "int",
+    "double",
+    "string_array",
+    "bool_array",
+    "int_array",
+    "double_array"
+  ]
+}
+
+ +## B3MultiPropagator + +No properties. + +Constraints: + +* `additionalProperties`: `false` + +Usages: + +* [`TextMapPropagator.b3multi`](#textmappropagator) + +
+JSON Schema + +[JSON Schema Source File](./schema/propagator.json) +
{
+  "type": [
+    "object",
+    "null"
+  ],
+  "additionalProperties": false
+}
+
+ +## B3Propagator + +No properties. + +Constraints: + +* `additionalProperties`: `false` + +Usages: + +* [`TextMapPropagator.b3`](#textmappropagator) + +
+JSON Schema + +[JSON Schema Source File](./schema/propagator.json) +
{
+  "type": [
+    "object",
+    "null"
+  ],
+  "additionalProperties": false
+}
+
+ +## BaggagePropagator + +No properties. + +Constraints: + +* `additionalProperties`: `false` + +Usages: + +* [`TextMapPropagator.baggage`](#textmappropagator) + +
+JSON Schema + +[JSON Schema Source File](./schema/propagator.json) +
{
+  "type": [
+    "object",
+    "null"
+  ],
+  "additionalProperties": false
+}
+
+ +## Base2ExponentialBucketHistogramAggregation + +| Property | Type | Required? | Constraints | Description | +|---|---|---|---|---| +| `max_scale` | one of:
* `integer`
* `null`
| `false` | No constraints. | TODO | +| `max_size` | one of:
* `integer`
* `null`
| `false` | No constraints. | TODO | +| `record_min_max` | one of:
* `boolean`
* `null`
| `false` | No constraints. | TODO | + +Constraints: + +* `additionalProperties`: `false` + +Usages: + +* [`Aggregation.base2_exponential_bucket_histogram`](#aggregation) + +
+JSON Schema + +[JSON Schema Source File](./schema/meter_provider.json) +
{
+  "type": [
+    "object",
+    "null"
+  ],
+  "additionalProperties": false,
+  "properties": {
+    "max_scale": {
+      "type": [
+        "integer",
+        "null"
+      ]
+    },
+    "max_size": {
+      "type": [
+        "integer",
+        "null"
+      ]
+    },
+    "record_min_max": {
+      "type": [
+        "boolean",
+        "null"
+      ]
+    }
+  }
+}
+
+ +## BatchLogRecordProcessor + +| Property | Type | Required? | Constraints | Description | +|---|---|---|---|---| +| `schedule_delay` | one of:
* `integer`
* `null`
| `false` | * `minimum`: `0`
| Configure delay interval (in milliseconds) between two consecutive exports.
Value must be non-negative.
If omitted or null, 1000 is used.
| +| `export_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.
| +| `max_queue_size` | one of:
* `integer`
* `null`
| `false` | * `exclusiveMinimum`: `0`
| Configure maximum queue size. Value must be positive.
If omitted or null, 2048 is used.
| +| `max_export_batch_size` | one of:
* `integer`
* `null`
| `false` | * `exclusiveMinimum`: `0`
| Configure maximum batch size. Value must be positive.
If omitted or null, 512 is used.
| +| `exporter` | [`LogRecordExporter`](#logrecordexporter) | `true` | No constraints. | Configure exporter. | + +Constraints: + +* `additionalProperties`: `false` +* `required`: `["exporter"]` + +Usages: + +* [`LogRecordProcessor.batch`](#logrecordprocessor) + +
+JSON Schema + +[JSON Schema Source File](./schema/logger_provider.json) +
{
+  "type": "object",
+  "additionalProperties": false,
+  "properties": {
+    "schedule_delay": {
+      "type": [
+        "integer",
+        "null"
+      ],
+      "minimum": 0
+    },
+    "export_timeout": {
+      "type": [
+        "integer",
+        "null"
+      ],
+      "minimum": 0
+    },
+    "max_queue_size": {
+      "type": [
+        "integer",
+        "null"
+      ],
+      "exclusiveMinimum": 0
+    },
+    "max_export_batch_size": {
+      "type": [
+        "integer",
+        "null"
+      ],
+      "exclusiveMinimum": 0
+    },
+    "exporter": {
+      "$ref": "#/$defs/LogRecordExporter"
+    }
+  },
+  "required": [
+    "exporter"
+  ]
+}
+
+ +## BatchSpanProcessor + +| Property | Type | Required? | Constraints | Description | +|---|---|---|---|---| +| `schedule_delay` | one of:
* `integer`
* `null`
| `false` | * `minimum`: `0`
| Configure delay interval (in milliseconds) between two consecutive exports.
Value must be non-negative.
If omitted or null, 5000 is used.
| +| `export_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.
| +| `max_queue_size` | one of:
* `integer`
* `null`
| `false` | * `exclusiveMinimum`: `0`
| Configure maximum queue size. Value must be positive.
If omitted or null, 2048 is used.
| +| `max_export_batch_size` | one of:
* `integer`
* `null`
| `false` | * `exclusiveMinimum`: `0`
| Configure maximum batch size. Value must be positive.
If omitted or null, 512 is used.
| +| `exporter` | [`SpanExporter`](#spanexporter) | `true` | No constraints. | Configure exporter. | + +Constraints: + +* `additionalProperties`: `false` +* `required`: `["exporter"]` + +Usages: + +* [`SpanProcessor.batch`](#spanprocessor) + +
+JSON Schema + +[JSON Schema Source File](./schema/tracer_provider.json) +
{
+  "type": "object",
+  "additionalProperties": false,
+  "properties": {
+    "schedule_delay": {
+      "type": [
+        "integer",
+        "null"
+      ],
+      "minimum": 0
+    },
+    "export_timeout": {
+      "type": [
+        "integer",
+        "null"
+      ],
+      "minimum": 0
+    },
+    "max_queue_size": {
+      "type": [
+        "integer",
+        "null"
+      ],
+      "exclusiveMinimum": 0
+    },
+    "max_export_batch_size": {
+      "type": [
+        "integer",
+        "null"
+      ],
+      "exclusiveMinimum": 0
+    },
+    "exporter": {
+      "$ref": "#/$defs/SpanExporter"
+    }
+  },
+  "required": [
+    "exporter"
+  ]
+}
+
+ +## CardinalityLimits + +| Property | Type | Required? | Constraints | Description | +|---|---|---|---|---| +| `default` | one of:
* `integer`
* `null`
| `false` | * `exclusiveMinimum`: `0`
| Configure default cardinality limit for all instrument types.
Instrument-specific cardinality limits take priority.
If omitted or null, 2000 is used.
| +| `counter` | one of:
* `integer`
* `null`
| `false` | * `exclusiveMinimum`: `0`
| Configure default cardinality limit for counter instruments.
If omitted or null, the value from .default is used.
| +| `gauge` | one of:
* `integer`
* `null`
| `false` | * `exclusiveMinimum`: `0`
| Configure default cardinality limit for gauge instruments.
If omitted or null, the value from .default is used.
| +| `histogram` | one of:
* `integer`
* `null`
| `false` | * `exclusiveMinimum`: `0`
| Configure default cardinality limit for histogram instruments.
If omitted or null, the value from .default is used.
| +| `observable_counter` | one of:
* `integer`
* `null`
| `false` | * `exclusiveMinimum`: `0`
| Configure default cardinality limit for observable_counter instruments.
If omitted or null, the value from .default is used.
| +| `observable_gauge` | one of:
* `integer`
* `null`
| `false` | * `exclusiveMinimum`: `0`
| Configure default cardinality limit for observable_gauge instruments.
If omitted or null, the value from .default is used.
| +| `observable_up_down_counter` | one of:
* `integer`
* `null`
| `false` | * `exclusiveMinimum`: `0`
| Configure default cardinality limit for observable_up_down_counter instruments.
If omitted or null, the value from .default is used.
| +| `up_down_counter` | one of:
* `integer`
* `null`
| `false` | * `exclusiveMinimum`: `0`
| Configure default cardinality limit for up_down_counter instruments.
If omitted or null, the value from .default is used.
| + +Constraints: + +* `additionalProperties`: `false` + +Usages: + +* [`PeriodicMetricReader.cardinality_limits`](#periodicmetricreader) +* [`PullMetricReader.cardinality_limits`](#pullmetricreader) + +
+JSON Schema + +[JSON Schema Source File](./schema/meter_provider.json) +
{
+  "type": "object",
+  "additionalProperties": false,
+  "properties": {
+    "default": {
+      "type": [
+        "integer",
+        "null"
+      ],
+      "exclusiveMinimum": 0
+    },
+    "counter": {
+      "type": [
+        "integer",
+        "null"
+      ],
+      "exclusiveMinimum": 0
+    },
+    "gauge": {
+      "type": [
+        "integer",
+        "null"
+      ],
+      "exclusiveMinimum": 0
+    },
+    "histogram": {
+      "type": [
+        "integer",
+        "null"
+      ],
+      "exclusiveMinimum": 0
+    },
+    "observable_counter": {
+      "type": [
+        "integer",
+        "null"
+      ],
+      "exclusiveMinimum": 0
+    },
+    "observable_gauge": {
+      "type": [
+        "integer",
+        "null"
+      ],
+      "exclusiveMinimum": 0
+    },
+    "observable_up_down_counter": {
+      "type": [
+        "integer",
+        "null"
+      ],
+      "exclusiveMinimum": 0
+    },
+    "up_down_counter": {
+      "type": [
+        "integer",
+        "null"
+      ],
+      "exclusiveMinimum": 0
+    }
+  }
+}
+
+ +## ConsoleExporter + +No properties. + +Constraints: + +* `additionalProperties`: `false` + +Usages: + +* [`LogRecordExporter.console`](#logrecordexporter) +* [`PushMetricExporter.console`](#pushmetricexporter) +* [`SpanExporter.console`](#spanexporter) + +
+JSON Schema + +[JSON Schema Source File](./schema/common.json) +
{
+  "type": [
+    "object",
+    "null"
+  ],
+  "additionalProperties": false
+}
+
+ +## DefaultAggregation + +No properties. + +Constraints: + +* `additionalProperties`: `false` + +Usages: + +* [`Aggregation.default`](#aggregation) + +
+JSON Schema + +[JSON Schema Source File](./schema/meter_provider.json) +
{
+  "type": [
+    "object",
+    "null"
+  ],
+  "additionalProperties": false
+}
+
+ +## DropAggregation + +No properties. + +Constraints: + +* `additionalProperties`: `false` + +Usages: + +* [`Aggregation.drop`](#aggregation) + +
+JSON Schema + +[JSON Schema Source File](./schema/meter_provider.json) +
{
+  "type": [
+    "object",
+    "null"
+  ],
+  "additionalProperties": false
+}
+
+ +## ExemplarFilter + +No properties. + +Constraints: + +* `enum`: `["always_on","always_off","trace_based"]` + +Usages: + +* [`MeterProvider.exemplar_filter`](#meterprovider) + +
+JSON Schema + +[JSON Schema Source File](./schema/meter_provider.json) +
{
+  "type": [
+    "string",
+    "null"
+  ],
+  "enum": [
+    "always_on",
+    "always_off",
+    "trace_based"
+  ]
+}
+
+ +## ExperimentalContainerResourceDetector + +No properties. + +Constraints: + +* `additionalProperties`: `false` + +Usages: + +* [`ExperimentalResourceDetector.container`](#experimentalresourcedetector) + +
+JSON Schema + +[JSON Schema Source File](./schema/resource.json) +
{
+  "type": [
+    "object",
+    "null"
+  ],
+  "additionalProperties": false
+}
+
+ +## ExperimentalGeneralInstrumentation + +| Property | Type | Required? | Constraints | Description | +|---|---|---|---|---| +| `peer` | [`ExperimentalPeerInstrumentation`](#experimentalpeerinstrumentation) | `false` | No constraints. | Configure instrumentations following the peer semantic conventions.
See peer semantic conventions: https://opentelemetry.io/docs/specs/semconv/attributes-registry/peer/
| +| `http` | [`ExperimentalHttpInstrumentation`](#experimentalhttpinstrumentation) | `false` | No constraints. | Configure instrumentations following the http semantic conventions.
See http semantic conventions: https://opentelemetry.io/docs/specs/semconv/http/
| + +Constraints: + +* `additionalProperties`: `false` + +Usages: + +* [`ExperimentalInstrumentation.general`](#experimentalinstrumentation) + +
+JSON Schema + +[JSON Schema Source File](./schema/instrumentation.json) +
{
+  "type": "object",
+  "additionalProperties": false,
+  "properties": {
+    "peer": {
+      "$ref": "#/$defs/ExperimentalPeerInstrumentation"
+    },
+    "http": {
+      "$ref": "#/$defs/ExperimentalHttpInstrumentation"
+    }
+  }
+}
+
+ +## ExperimentalHostResourceDetector + +No properties. + +Constraints: + +* `additionalProperties`: `false` + +Usages: + +* [`ExperimentalResourceDetector.host`](#experimentalresourcedetector) + +
+JSON Schema + +[JSON Schema Source File](./schema/resource.json) +
{
+  "type": [
+    "object",
+    "null"
+  ],
+  "additionalProperties": false
+}
+
+ +## ExperimentalHttpClientInstrumentation + +| Property | Type | Required? | Constraints | Description | +|---|---|---|---|---| +| `request_captured_headers` | `array` of `string` | `false` | No constraints. | 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.
| + +Constraints: + +* `additionalProperties`: `false` + +Usages: + +* [`ExperimentalHttpInstrumentation.client`](#experimentalhttpinstrumentation) + +
+JSON Schema + +[JSON Schema Source File](./schema/instrumentation.json) +
{
+  "type": "object",
+  "additionalProperties": false,
+  "properties": {
+    "request_captured_headers": {
+      "type": "array",
+      "items": {
+        "type": "string"
+      }
+    },
+    "response_captured_headers": {
+      "type": "array",
+      "items": {
+        "type": "string"
+      }
+    }
+  }
+}
+
+ +## ExperimentalHttpInstrumentation + +| Property | Type | Required? | Constraints | Description | +|---|---|---|---|---| +| `client` | [`ExperimentalHttpClientInstrumentation`](#experimentalhttpclientinstrumentation) | `false` | No constraints. | Configure instrumentations following the http client semantic conventions. | +| `server` | [`ExperimentalHttpServerInstrumentation`](#experimentalhttpserverinstrumentation) | `false` | No constraints. | Configure instrumentations following the http server semantic conventions. | + +Constraints: + +* `additionalProperties`: `false` + +Usages: + +* [`ExperimentalGeneralInstrumentation.http`](#experimentalgeneralinstrumentation) + +
+JSON Schema + +[JSON Schema Source File](./schema/instrumentation.json) +
{
+  "type": "object",
+  "additionalProperties": false,
+  "properties": {
+    "client": {
+      "$ref": "#/$defs/ExperimentalHttpClientInstrumentation"
+    },
+    "server": {
+      "$ref": "#/$defs/ExperimentalHttpServerInstrumentation"
+    }
+  }
+}
+
+ +## ExperimentalHttpServerInstrumentation + +| 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.
| + +Constraints: + +* `additionalProperties`: `false` + +Usages: + +* [`ExperimentalHttpInstrumentation.server`](#experimentalhttpinstrumentation) + +
+JSON Schema + +[JSON Schema Source File](./schema/instrumentation.json) +
{
+  "type": "object",
+  "additionalProperties": false,
+  "properties": {
+    "request_captured_headers": {
+      "type": "array",
+      "items": {
+        "type": "string"
+      }
+    },
+    "response_captured_headers": {
+      "type": "array",
+      "items": {
+        "type": "string"
+      }
+    }
+  }
+}
+
+ +## ExperimentalInstrumentation + +| Property | Type | Required? | Constraints | Description | +|---|---|---|---|---| +| `general` | [`ExperimentalGeneralInstrumentation`](#experimentalgeneralinstrumentation) | `false` | No constraints. | Configure general SemConv options that may apply to multiple languages and instrumentations.
Instrumenation may merge general config options with the language specific configuration at .instrumentation..
| +| `cpp` | [`ExperimentalLanguageSpecificInstrumentation`](#experimentallanguagespecificinstrumentation) | `false` | No constraints. | Configure C++ language-specific instrumentation libraries. | +| `dotnet` | [`ExperimentalLanguageSpecificInstrumentation`](#experimentallanguagespecificinstrumentation) | `false` | No constraints. | Configure .NET language-specific instrumentation libraries.
Each entry's key identifies a particular instrumentation library. The corresponding value configures it.
| +| `erlang` | [`ExperimentalLanguageSpecificInstrumentation`](#experimentallanguagespecificinstrumentation) | `false` | No constraints. | Configure Erlang language-specific instrumentation libraries.
Each entry's key identifies a particular instrumentation library. The corresponding value configures it.
| +| `go` | [`ExperimentalLanguageSpecificInstrumentation`](#experimentallanguagespecificinstrumentation) | `false` | No constraints. | Configure Go language-specific instrumentation libraries.
Each entry's key identifies a particular instrumentation library. The corresponding value configures it.
| +| `java` | [`ExperimentalLanguageSpecificInstrumentation`](#experimentallanguagespecificinstrumentation) | `false` | No constraints. | Configure Java language-specific instrumentation libraries.
Each entry's key identifies a particular instrumentation library. The corresponding value configures it.
| +| `js` | [`ExperimentalLanguageSpecificInstrumentation`](#experimentallanguagespecificinstrumentation) | `false` | No constraints. | Configure JavaScript language-specific instrumentation libraries.
Each entry's key identifies a particular instrumentation library. The corresponding value configures it.
| +| `php` | [`ExperimentalLanguageSpecificInstrumentation`](#experimentallanguagespecificinstrumentation) | `false` | No constraints. | Configure PHP language-specific instrumentation libraries.
Each entry's key identifies a particular instrumentation library. The corresponding value configures it.
| +| `python` | [`ExperimentalLanguageSpecificInstrumentation`](#experimentallanguagespecificinstrumentation) | `false` | No constraints. | Configure Python language-specific instrumentation libraries.
Each entry's key identifies a particular instrumentation library. The corresponding value configures it.
| +| `ruby` | [`ExperimentalLanguageSpecificInstrumentation`](#experimentallanguagespecificinstrumentation) | `false` | No constraints. | Configure Ruby language-specific instrumentation libraries.
Each entry's key identifies a particular instrumentation library. The corresponding value configures it.
| +| `rust` | [`ExperimentalLanguageSpecificInstrumentation`](#experimentallanguagespecificinstrumentation) | `false` | No constraints. | Configure Rust language-specific instrumentation libraries.
Each entry's key identifies a particular instrumentation library. The corresponding value configures it.
| +| `swift` | [`ExperimentalLanguageSpecificInstrumentation`](#experimentallanguagespecificinstrumentation) | `false` | No constraints. | Configure Swift language-specific instrumentation libraries.
Each entry's key identifies a particular instrumentation library. The corresponding value configures it.
| + +Constraints: + +* `patternProperties`: `{".*":{"$ref":"#/$defs/ExperimentalLanguageSpecificInstrumentation"}}` +* `additionalProperties`: `false` + +Usages: + +* [`OpentelemetryConfiguration.instrumentation/development`](#opentelemetryconfiguration) + +
+JSON Schema + +[JSON Schema Source File](./schema/instrumentation.json) +
{
+  "$id": "https://opentelemetry.io/otelconfig/instrumentation.json",
+  "$schema": "https://json-schema.org/draft/2020-12/schema",
+  "type": "object",
+  "additionalProperties": false,
+  "properties": {
+    "general": {
+      "$ref": "#/$defs/ExperimentalGeneralInstrumentation"
+    },
+    "cpp": {
+      "$ref": "#/$defs/ExperimentalLanguageSpecificInstrumentation"
+    },
+    "dotnet": {
+      "$ref": "#/$defs/ExperimentalLanguageSpecificInstrumentation"
+    },
+    "erlang": {
+      "$ref": "#/$defs/ExperimentalLanguageSpecificInstrumentation"
+    },
+    "go": {
+      "$ref": "#/$defs/ExperimentalLanguageSpecificInstrumentation"
+    },
+    "java": {
+      "$ref": "#/$defs/ExperimentalLanguageSpecificInstrumentation"
+    },
+    "js": {
+      "$ref": "#/$defs/ExperimentalLanguageSpecificInstrumentation"
+    },
+    "php": {
+      "$ref": "#/$defs/ExperimentalLanguageSpecificInstrumentation"
+    },
+    "python": {
+      "$ref": "#/$defs/ExperimentalLanguageSpecificInstrumentation"
+    },
+    "ruby": {
+      "$ref": "#/$defs/ExperimentalLanguageSpecificInstrumentation"
+    },
+    "rust": {
+      "$ref": "#/$defs/ExperimentalLanguageSpecificInstrumentation"
+    },
+    "swift": {
+      "$ref": "#/$defs/ExperimentalLanguageSpecificInstrumentation"
+    }
+  },
+  "patternProperties": {
+    ".*": {
+      "$ref": "#/$defs/ExperimentalLanguageSpecificInstrumentation"
+    }
+  },
+  "$defs": {
+    "ExperimentalGeneralInstrumentation": {
+      "type": "object",
+      "additionalProperties": false,
+      "properties": {
+        "peer": {
+          "$ref": "#/$defs/ExperimentalPeerInstrumentation"
+        },
+        "http": {
+          "$ref": "#/$defs/ExperimentalHttpInstrumentation"
+        }
+      }
+    },
+    "ExperimentalPeerInstrumentation": {
+      "type": "object",
+      "additionalProperties": false,
+      "properties": {
+        "service_mapping": {
+          "type": "array",
+          "items": {
+            "$ref": "#/$defs/ExperimentalPeerServiceMapping"
+          }
+        }
+      }
+    },
+    "ExperimentalPeerServiceMapping": {
+      "type": "object",
+      "additionalProperties": false,
+      "properties": {
+        "peer": {
+          "type": "string"
+        },
+        "service": {
+          "type": "string"
+        }
+      },
+      "required": [
+        "peer",
+        "service"
+      ]
+    },
+    "ExperimentalHttpClientInstrumentation": {
+      "type": "object",
+      "additionalProperties": false,
+      "properties": {
+        "request_captured_headers": {
+          "type": "array",
+          "items": {
+            "type": "string"
+          }
+        },
+        "response_captured_headers": {
+          "type": "array",
+          "items": {
+            "type": "string"
+          }
+        }
+      }
+    },
+    "ExperimentalHttpServerInstrumentation": {
+      "type": "object",
+      "additionalProperties": false,
+      "properties": {
+        "request_captured_headers": {
+          "type": "array",
+          "items": {
+            "type": "string"
+          }
+        },
+        "response_captured_headers": {
+          "type": "array",
+          "items": {
+            "type": "string"
+          }
+        }
+      }
+    },
+    "ExperimentalHttpInstrumentation": {
+      "type": "object",
+      "additionalProperties": false,
+      "properties": {
+        "client": {
+          "$ref": "#/$defs/ExperimentalHttpClientInstrumentation"
+        },
+        "server": {
+          "$ref": "#/$defs/ExperimentalHttpServerInstrumentation"
+        }
+      }
+    },
+    "ExperimentalLanguageSpecificInstrumentation": {
+      "type": "object",
+      "additionalProperties": true,
+      "patternProperties": {
+        ".*": {
+          "type": "object"
+        }
+      }
+    }
+  }
+}
+
+ +## ExperimentalLanguageSpecificInstrumentation + +No properties. + +Constraints: + +* `patternProperties`: `{".*":{"type":"object"}}` +* `additionalProperties`: `true` + +Usages: + +* [`ExperimentalInstrumentation.cpp`](#experimentalinstrumentation) +* [`ExperimentalInstrumentation.dotnet`](#experimentalinstrumentation) +* [`ExperimentalInstrumentation.erlang`](#experimentalinstrumentation) +* [`ExperimentalInstrumentation.go`](#experimentalinstrumentation) +* [`ExperimentalInstrumentation.java`](#experimentalinstrumentation) +* [`ExperimentalInstrumentation.js`](#experimentalinstrumentation) +* [`ExperimentalInstrumentation.php`](#experimentalinstrumentation) +* [`ExperimentalInstrumentation.python`](#experimentalinstrumentation) +* [`ExperimentalInstrumentation.ruby`](#experimentalinstrumentation) +* [`ExperimentalInstrumentation.rust`](#experimentalinstrumentation) +* [`ExperimentalInstrumentation.swift`](#experimentalinstrumentation) + +
+JSON Schema + +[JSON Schema Source File](./schema/instrumentation.json) +
{
+  "type": "object",
+  "additionalProperties": true,
+  "patternProperties": {
+    ".*": {
+      "type": "object"
+    }
+  }
+}
+
+ +## ExperimentalLoggerConfig + +| Property | Type | Required? | Constraints | Description | +|---|---|---|---|---| +| `disabled` | `boolean` | `false` | No constraints. | Configure if the logger is enabled or not. | + +Constraints: + +* `additionalProperties`: `false` + +Usages: + +* [`ExperimentalLoggerConfigurator.default_config`](#experimentalloggerconfigurator) +* [`ExperimentalLoggerMatcherAndConfig.config`](#experimentalloggermatcherandconfig) + +
+JSON Schema + +[JSON Schema Source File](./schema/logger_provider.json) +
{
+  "type": [
+    "object"
+  ],
+  "additionalProperties": false,
+  "properties": {
+    "disabled": {
+      "type": [
+        "boolean"
+      ]
+    }
+  }
+}
+
+ +## ExperimentalLoggerConfigurator + +| 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. | + +Constraints: + +* `additionalProperties`: `false` + +Usages: + +* [`LoggerProvider.logger_configurator/development`](#loggerprovider) + +
+JSON Schema + +[JSON Schema Source File](./schema/logger_provider.json) +
{
+  "type": [
+    "object"
+  ],
+  "additionalProperties": false,
+  "properties": {
+    "default_config": {
+      "$ref": "#/$defs/ExperimentalLoggerConfig"
+    },
+    "loggers": {
+      "type": "array",
+      "items": {
+        "$ref": "#/$defs/ExperimentalLoggerMatcherAndConfig"
+      }
+    }
+  }
+}
+
+ +## ExperimentalLoggerMatcherAndConfig + +| Property | Type | Required? | Constraints | Description | +|---|---|---|---|---| +| `name` | `string` | `false` | No constraints. | Configure logger names to match, evaluated as follows:

* If the logger name exactly matches.
* If the logger name matches the wildcard pattern, where '?' matches any single character and '*' matches any number of characters including none.
| +| `config` | [`ExperimentalLoggerConfig`](#experimentalloggerconfig) | `false` | No constraints. | The logger config. | + +Constraints: + +* `additionalProperties`: `false` + +Usages: + +* [`ExperimentalLoggerConfigurator.loggers`](#experimentalloggerconfigurator) + +
+JSON Schema + +[JSON Schema Source File](./schema/logger_provider.json) +
{
+  "type": [
+    "object"
+  ],
+  "additionalProperties": false,
+  "properties": {
+    "name": {
+      "type": [
+        "string"
+      ]
+    },
+    "config": {
+      "$ref": "#/$defs/ExperimentalLoggerConfig"
+    }
+  }
+}
+
+ +## ExperimentalMeterConfig + +| Property | Type | Required? | Constraints | Description | +|---|---|---|---|---| +| `disabled` | `boolean` | `false` | No constraints. | Configure if the meter is enabled or not. | + +Constraints: + +* `additionalProperties`: `false` + +Usages: + +* [`ExperimentalMeterConfigurator.default_config`](#experimentalmeterconfigurator) +* [`ExperimentalMeterMatcherAndConfig.config`](#experimentalmetermatcherandconfig) + +
+JSON Schema + +[JSON Schema Source File](./schema/meter_provider.json) +
{
+  "type": [
+    "object"
+  ],
+  "additionalProperties": false,
+  "properties": {
+    "disabled": {
+      "type": [
+        "boolean"
+      ]
+    }
+  }
+}
+
+ +## ExperimentalMeterConfigurator + +| 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. | + +Constraints: + +* `additionalProperties`: `false` + +Usages: + +* [`MeterProvider.meter_configurator/development`](#meterprovider) + +
+JSON Schema + +[JSON Schema Source File](./schema/meter_provider.json) +
{
+  "type": [
+    "object"
+  ],
+  "additionalProperties": false,
+  "properties": {
+    "default_config": {
+      "$ref": "#/$defs/ExperimentalMeterConfig"
+    },
+    "meters": {
+      "type": "array",
+      "items": {
+        "$ref": "#/$defs/ExperimentalMeterMatcherAndConfig"
+      }
+    }
+  }
+}
+
+ +## ExperimentalMeterMatcherAndConfig + +| Property | Type | Required? | Constraints | Description | +|---|---|---|---|---| +| `name` | `string` | `false` | No constraints. | Configure meter names to match, evaluated as follows:

* If the meter name exactly matches.
* If the meter name matches the wildcard pattern, where '?' matches any single character and '*' matches any number of characters including none.
| +| `config` | [`ExperimentalMeterConfig`](#experimentalmeterconfig) | `false` | No constraints. | The meter config. | + +Constraints: + +* `additionalProperties`: `false` + +Usages: + +* [`ExperimentalMeterConfigurator.meters`](#experimentalmeterconfigurator) + +
+JSON Schema + +[JSON Schema Source File](./schema/meter_provider.json) +
{
+  "type": [
+    "object"
+  ],
+  "additionalProperties": false,
+  "properties": {
+    "name": {
+      "type": [
+        "string"
+      ]
+    },
+    "config": {
+      "$ref": "#/$defs/ExperimentalMeterConfig"
+    }
+  }
+}
+
+ +## ExperimentalOtlpFileExporter + +| Property | Type | Required? | Constraints | Description | +|---|---|---|---|---| +| `output_stream` | one of:
* `string`
* `null`
| `false` | No constraints. | Configure output stream.
Values include stdout, or scheme+destination. For example: file:///path/to/file.jsonl.
If omitted or null, stdout is used.
| + +Constraints: + +* `additionalProperties`: `false` + +Usages: + +* [`LogRecordExporter.otlp_file/development`](#logrecordexporter) +* [`SpanExporter.otlp_file/development`](#spanexporter) + +
+JSON Schema + +[JSON Schema Source File](./schema/common.json) +
{
+  "type": [
+    "object",
+    "null"
+  ],
+  "additionalProperties": false,
+  "properties": {
+    "output_stream": {
+      "type": [
+        "string",
+        "null"
+      ]
+    }
+  }
+}
+
+ +## ExperimentalOtlpFileMetricExporter + +| Property | Type | Required? | Constraints | Description | +|---|---|---|---|---| +| `output_stream` | one of:
* `string`
* `null`
| `false` | No constraints. | Configure output stream.
Values include stdout, or scheme+destination. For example: file:///path/to/file.jsonl.
If omitted or null, stdout is used.
| +| `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.
| +| `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.
| + +Constraints: + +* `additionalProperties`: `false` + +Usages: + +* [`PushMetricExporter.otlp_file/development`](#pushmetricexporter) + +
+JSON Schema + +[JSON Schema Source File](./schema/meter_provider.json) +
{
+  "type": [
+    "object",
+    "null"
+  ],
+  "additionalProperties": false,
+  "properties": {
+    "output_stream": {
+      "type": [
+        "string",
+        "null"
+      ]
+    },
+    "temporality_preference": {
+      "$ref": "#/$defs/ExporterTemporalityPreference"
+    },
+    "default_histogram_aggregation": {
+      "$ref": "#/$defs/ExporterDefaultHistogramAggregation"
+    }
+  }
+}
+
+ +## ExperimentalPeerInstrumentation + +| 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
| + +Constraints: + +* `additionalProperties`: `false` + +Usages: + +* [`ExperimentalGeneralInstrumentation.peer`](#experimentalgeneralinstrumentation) + +
+JSON Schema + +[JSON Schema Source File](./schema/instrumentation.json) +
{
+  "type": "object",
+  "additionalProperties": false,
+  "properties": {
+    "service_mapping": {
+      "type": "array",
+      "items": {
+        "$ref": "#/$defs/ExperimentalPeerServiceMapping"
+      }
+    }
+  }
+}
+
+ +## ExperimentalPeerServiceMapping + +| Property | Type | Required? | Constraints | Description | +|---|---|---|---|---| +| `peer` | `string` | `true` | No constraints. | The IP address to map.
| +| `service` | `string` | `true` | No constraints. | The logical name corresponding to the IP address of .peer.
| + +Constraints: + +* `additionalProperties`: `false` +* `required`: `["peer","service"]` + +Usages: + +* [`ExperimentalPeerInstrumentation.service_mapping`](#experimentalpeerinstrumentation) + +
+JSON Schema + +[JSON Schema Source File](./schema/instrumentation.json) +
{
+  "type": "object",
+  "additionalProperties": false,
+  "properties": {
+    "peer": {
+      "type": "string"
+    },
+    "service": {
+      "type": "string"
+    }
+  },
+  "required": [
+    "peer",
+    "service"
+  ]
+}
+
+ +## ExperimentalProcessResourceDetector + +No properties. + +Constraints: + +* `additionalProperties`: `false` + +Usages: + +* [`ExperimentalResourceDetector.process`](#experimentalresourcedetector) + +
+JSON Schema + +[JSON Schema Source File](./schema/resource.json) +
{
+  "type": [
+    "object",
+    "null"
+  ],
+  "additionalProperties": false
+}
+
+ +## ExperimentalPrometheusMetricExporter + +| Property | Type | Required? | Constraints | Description | +|---|---|---|---|---| +| `host` | one of:
* `string`
* `null`
| `false` | No constraints. | Configure host.
If omitted or null, localhost is used.
| +| `port` | one of:
* `integer`
* `null`
| `false` | No constraints. | Configure port.
If omitted or null, 9464 is used.
| +| `without_scope_info` | one of:
* `boolean`
* `null`
| `false` | No constraints. | Configure Prometheus Exporter to produce metrics without a scope info metric.
If omitted or null, false is used.
| +| `with_resource_constant_labels` | [`IncludeExclude`](#includeexclude) | `false` | No constraints. | Configure Prometheus Exporter to add resource attributes as metrics attributes, where the resource attribute keys match the patterns. | +| `translation_strategy` | one of:
* `string`
* `null`
| `false` | * `enum`: `["UnderscoreEscapingWithSuffixes","UnderscoreEscapingWithoutSuffixes","NoUTF8EscapingWithSuffixes","NoTranslation"]`
| Configure how Prometheus metrics are exposed. Values include:

* UnderscoreEscapingWithSuffixes, the default. This fully escapes metric names for classic Prometheus metric name compatibility, and includes appending type and unit suffixes.
* UnderscoreEscapingWithoutSuffixes, metric names will continue to escape special characters to _, but suffixes won't be attached.
* NoUTF8EscapingWithSuffixes will disable changing special characters to _. Special suffixes like units and _total for counters will be attached.
* NoTranslation. This strategy bypasses all metric and label name translation, passing them through unaltered.

If omitted or null, UnderscoreEscapingWithSuffixes is used.
| + +Constraints: + +* `additionalProperties`: `false` + +Usages: + +* [`PullMetricExporter.prometheus/development`](#pullmetricexporter) + +
+JSON Schema + +[JSON Schema Source File](./schema/meter_provider.json) +
{
+  "type": [
+    "object",
+    "null"
+  ],
+  "additionalProperties": false,
+  "properties": {
+    "host": {
+      "type": [
+        "string",
+        "null"
+      ]
+    },
+    "port": {
+      "type": [
+        "integer",
+        "null"
+      ]
+    },
+    "without_scope_info": {
+      "type": [
+        "boolean",
+        "null"
+      ]
+    },
+    "with_resource_constant_labels": {
+      "$ref": "common.json#/$defs/IncludeExclude"
+    },
+    "translation_strategy": {
+      "type": [
+        "string",
+        "null"
+      ],
+      "enum": [
+        "UnderscoreEscapingWithSuffixes",
+        "UnderscoreEscapingWithoutSuffixes",
+        "NoUTF8EscapingWithSuffixes",
+        "NoTranslation"
+      ]
+    }
+  }
+}
+
+ +## ExperimentalResourceDetection + +| 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.
| + +Constraints: + +* `additionalProperties`: `false` + +Usages: + +* [`Resource.detection/development`](#resource) + +
+JSON Schema + +[JSON Schema Source File](./schema/resource.json) +
{
+  "type": "object",
+  "additionalProperties": false,
+  "properties": {
+    "attributes": {
+      "$ref": "common.json#/$defs/IncludeExclude"
+    },
+    "detectors": {
+      "type": "array",
+      "items": {
+        "$ref": "#/$defs/ExperimentalResourceDetector"
+      }
+    }
+  }
+}
+
+ +## ExperimentalResourceDetector + +`ExperimentalResourceDetector` is an [SDK extension plugin](#sdk-extension-plugins). + +| Property | Type | Required? | Constraints | Description | +|---|---|---|---|---| +| `container` | [`ExperimentalContainerResourceDetector`](#experimentalcontainerresourcedetector) | `false` | No constraints. | Enable the container resource detector, which populates container.* attributes.
| +| `host` | [`ExperimentalHostResourceDetector`](#experimentalhostresourcedetector) | `false` | No constraints. | Enable the host resource detector, which populates host.* and os.* attributes.
| +| `process` | [`ExperimentalProcessResourceDetector`](#experimentalprocessresourcedetector) | `false` | No constraints. | Enable the process resource detector, which populates process.* attributes.
| +| `service` | [`ExperimentalServiceResourceDetector`](#experimentalserviceresourcedetector) | `false` | No constraints. | Enable the service detector, which populates service.name based on the OTEL_SERVICE_NAME environment variable and service.instance.id.
| + +Constraints: + +* `patternProperties`: `{".*":{"type":["object","null"]}}` +* `additionalProperties`: `true` +* `minProperties`: `1` +* `maxProperties`: `1` + +Usages: + +* [`ExperimentalResourceDetection.detectors`](#experimentalresourcedetection) + +
+JSON Schema + +[JSON Schema Source File](./schema/resource.json) +
{
+  "type": "object",
+  "additionalProperties": true,
+  "minProperties": 1,
+  "maxProperties": 1,
+  "properties": {
+    "container": {
+      "$ref": "#/$defs/ExperimentalContainerResourceDetector"
+    },
+    "host": {
+      "$ref": "#/$defs/ExperimentalHostResourceDetector"
+    },
+    "process": {
+      "$ref": "#/$defs/ExperimentalProcessResourceDetector"
+    },
+    "service": {
+      "$ref": "#/$defs/ExperimentalServiceResourceDetector"
+    }
+  },
+  "patternProperties": {
+    ".*": {
+      "type": [
+        "object",
+        "null"
+      ]
+    }
+  }
+}
+
+ +## ExperimentalServiceResourceDetector + +No properties. + +Constraints: + +* `additionalProperties`: `false` + +Usages: + +* [`ExperimentalResourceDetector.service`](#experimentalresourcedetector) + +
+JSON Schema + +[JSON Schema Source File](./schema/resource.json) +
{
+  "type": [
+    "object",
+    "null"
+  ],
+  "additionalProperties": false
+}
+
+ +## ExperimentalTracerConfig + +| Property | Type | Required? | Constraints | Description | +|---|---|---|---|---| +| `disabled` | `boolean` | `false` | No constraints. | Configure if the tracer is enabled or not. | + +Constraints: + +* `additionalProperties`: `false` + +Usages: + +* [`ExperimentalTracerConfigurator.default_config`](#experimentaltracerconfigurator) +* [`ExperimentalTracerMatcherAndConfig.config`](#experimentaltracermatcherandconfig) + +
+JSON Schema + +[JSON Schema Source File](./schema/tracer_provider.json) +
{
+  "type": [
+    "object"
+  ],
+  "additionalProperties": false,
+  "properties": {
+    "disabled": {
+      "type": [
+        "boolean"
+      ]
+    }
+  }
+}
+
+ +## ExperimentalTracerConfigurator + +| 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. | + +Constraints: + +* `additionalProperties`: `false` + +Usages: + +* [`TracerProvider.tracer_configurator/development`](#tracerprovider) + +
+JSON Schema + +[JSON Schema Source File](./schema/tracer_provider.json) +
{
+  "type": [
+    "object"
+  ],
+  "additionalProperties": false,
+  "properties": {
+    "default_config": {
+      "$ref": "#/$defs/ExperimentalTracerConfig"
+    },
+    "tracers": {
+      "type": "array",
+      "items": {
+        "$ref": "#/$defs/ExperimentalTracerMatcherAndConfig"
+      }
+    }
+  }
+}
+
+ +## ExperimentalTracerMatcherAndConfig + +| Property | Type | Required? | Constraints | Description | +|---|---|---|---|---| +| `name` | `string` | `false` | No constraints. | Configure tracer names to match, evaluated as follows:

* If the tracer name exactly matches.
* If the tracer name matches the wildcard pattern, where '?' matches any single character and '*' matches any number of characters including none.
| +| `config` | [`ExperimentalTracerConfig`](#experimentaltracerconfig) | `false` | No constraints. | The tracer config. | + +Constraints: + +* `additionalProperties`: `false` + +Usages: + +* [`ExperimentalTracerConfigurator.tracers`](#experimentaltracerconfigurator) + +
+JSON Schema + +[JSON Schema Source File](./schema/tracer_provider.json) +
{
+  "type": [
+    "object"
+  ],
+  "additionalProperties": false,
+  "properties": {
+    "name": {
+      "type": [
+        "string"
+      ]
+    },
+    "config": {
+      "$ref": "#/$defs/ExperimentalTracerConfig"
+    }
+  }
+}
+
+ +## ExplicitBucketHistogramAggregation + +| 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.
| +| `record_min_max` | one of:
* `boolean`
* `null`
| `false` | No constraints. | Configure record min and max.
If omitted or null, true is used.
| + +Constraints: + +* `additionalProperties`: `false` + +Usages: + +* [`Aggregation.explicit_bucket_histogram`](#aggregation) + +
+JSON Schema + +[JSON Schema Source File](./schema/meter_provider.json) +
{
+  "type": [
+    "object",
+    "null"
+  ],
+  "additionalProperties": false,
+  "properties": {
+    "boundaries": {
+      "type": "array",
+      "items": {
+        "type": "number"
+      }
+    },
+    "record_min_max": {
+      "type": [
+        "boolean",
+        "null"
+      ]
+    }
+  }
+}
+
+ +## ExporterDefaultHistogramAggregation + +No properties. + +Constraints: + +* `enum`: `["explicit_bucket_histogram","base2_exponential_bucket_histogram"]` + +Usages: + +* [`OtlpHttpMetricExporter.default_histogram_aggregation`](#otlphttpmetricexporter) +* [`OtlpGrpcMetricExporter.default_histogram_aggregation`](#otlpgrpcmetricexporter) +* [`ExperimentalOtlpFileMetricExporter.default_histogram_aggregation`](#experimentalotlpfilemetricexporter) + +
+JSON Schema + +[JSON Schema Source File](./schema/meter_provider.json) +
{
+  "type": [
+    "string",
+    "null"
+  ],
+  "enum": [
+    "explicit_bucket_histogram",
+    "base2_exponential_bucket_histogram"
+  ]
+}
+
+ +## ExporterTemporalityPreference + +No properties. + +Constraints: + +* `enum`: `["cumulative","delta","low_memory"]` + +Usages: + +* [`OtlpHttpMetricExporter.temporality_preference`](#otlphttpmetricexporter) +* [`OtlpGrpcMetricExporter.temporality_preference`](#otlpgrpcmetricexporter) +* [`ExperimentalOtlpFileMetricExporter.temporality_preference`](#experimentalotlpfilemetricexporter) + +
+JSON Schema + +[JSON Schema Source File](./schema/meter_provider.json) +
{
+  "type": [
+    "string",
+    "null"
+  ],
+  "enum": [
+    "cumulative",
+    "delta",
+    "low_memory"
+  ]
+}
+
+ +## IncludeExclude + +| Property | Type | Required? | Constraints | Description | +|---|---|---|---|---| +| `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` | 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.
| + +Constraints: + +* `additionalProperties`: `false` + +Usages: + +* [`ExperimentalPrometheusMetricExporter.with_resource_constant_labels`](#experimentalprometheusmetricexporter) +* [`ViewStream.attribute_keys`](#viewstream) +* [`ExperimentalResourceDetection.attributes`](#experimentalresourcedetection) + +
+JSON Schema + +[JSON Schema Source File](./schema/common.json) +
{
+  "type": "object",
+  "additionalProperties": false,
+  "properties": {
+    "included": {
+      "type": "array",
+      "items": {
+        "type": "string"
+      }
+    },
+    "excluded": {
+      "type": "array",
+      "items": {
+        "type": "string"
+      }
+    }
+  }
+}
+
+ +## InstrumentType + +No properties. + +Constraints: + +* `enum`: `["counter","gauge","histogram","observable_counter","observable_gauge","observable_up_down_counter","up_down_counter"]` + +Usages: + +* [`ViewSelector.instrument_type`](#viewselector) + +
+JSON Schema + +[JSON Schema Source File](./schema/meter_provider.json) +
{
+  "type": [
+    "string",
+    "null"
+  ],
+  "enum": [
+    "counter",
+    "gauge",
+    "histogram",
+    "observable_counter",
+    "observable_gauge",
+    "observable_up_down_counter",
+    "up_down_counter"
+  ]
+}
+
+ +## JaegerPropagator + +No properties. + +Constraints: + +* `additionalProperties`: `false` + +Usages: + +* [`TextMapPropagator.jaeger`](#textmappropagator) + +
+JSON Schema + +[JSON Schema Source File](./schema/propagator.json) +
{
+  "type": [
+    "object",
+    "null"
+  ],
+  "additionalProperties": false
+}
+
+ +## JaegerRemoteSampler + +| Property | Type | Required? | Constraints | Description | +|---|---|---|---|---| +| `endpoint` | one of:
* `string`
* `null`
| `false` | No constraints. | TODO | +| `interval` | one of:
* `integer`
* `null`
| `false` | * `minimum`: `0`
| TODO | +| `initial_sampler` | [`Sampler`](#sampler) | `false` | No constraints. | TODO | + +Constraints: + +* `additionalProperties`: `false` + +Usages: + +* [`Sampler.jaeger_remote`](#sampler) + +
+JSON Schema + +[JSON Schema Source File](./schema/tracer_provider.json) +
{
+  "type": [
+    "object",
+    "null"
+  ],
+  "additionalProperties": false,
+  "properties": {
+    "endpoint": {
+      "type": [
+        "string",
+        "null"
+      ]
+    },
+    "interval": {
+      "type": [
+        "integer",
+        "null"
+      ],
+      "minimum": 0
+    },
+    "initial_sampler": {
+      "$ref": "#/$defs/Sampler"
+    }
+  }
+}
+
+ +## LastValueAggregation + +No properties. + +Constraints: + +* `additionalProperties`: `false` + +Usages: + +* [`Aggregation.last_value`](#aggregation) + +
+JSON Schema + +[JSON Schema Source File](./schema/meter_provider.json) +
{
+  "type": [
+    "object",
+    "null"
+  ],
+  "additionalProperties": false
+}
+
+ +## LoggerProvider + +| Property | Type | Required? | Constraints | Description | +|---|---|---|---|---| +| `processors` | `array` of [`LogRecordProcessor`](#logrecordprocessor) | `true` | No constraints. | Configure log record processors. | +| `limits` | [`LogRecordLimits`](#logrecordlimits) | `false` | No constraints. | Configure log record limits. See also attribute_limits. | +| `logger_configurator/development` | [`ExperimentalLoggerConfigurator`](#experimentalloggerconfigurator) | `false` | No constraints. | Configure loggers.
This type is in development and subject to breaking changes in minor versions.
| + +Constraints: + +* `additionalProperties`: `false` +* `required`: `["processors"]` + +Usages: + +* [`OpentelemetryConfiguration.logger_provider`](#opentelemetryconfiguration) + +
+JSON Schema + +[JSON Schema Source File](./schema/logger_provider.json) +
{
+  "$id": "https://opentelemetry.io/otelconfig/logger_provider.json",
+  "$schema": "https://json-schema.org/draft/2020-12/schema",
+  "type": "object",
+  "additionalProperties": false,
+  "properties": {
+    "processors": {
+      "type": "array",
+      "minItems": 1,
+      "items": {
+        "$ref": "#/$defs/LogRecordProcessor"
+      }
+    },
+    "limits": {
+      "$ref": "#/$defs/LogRecordLimits"
+    },
+    "logger_configurator/development": {
+      "$ref": "#/$defs/ExperimentalLoggerConfigurator"
+    }
+  },
+  "required": [
+    "processors"
+  ],
+  "$defs": {
+    "SimpleLogRecordProcessor": {
+      "type": "object",
+      "additionalProperties": false,
+      "properties": {
+        "exporter": {
+          "$ref": "#/$defs/LogRecordExporter"
+        }
+      },
+      "required": [
+        "exporter"
+      ]
+    },
+    "BatchLogRecordProcessor": {
+      "type": "object",
+      "additionalProperties": false,
+      "properties": {
+        "schedule_delay": {
+          "type": [
+            "integer",
+            "null"
+          ],
+          "minimum": 0
+        },
+        "export_timeout": {
+          "type": [
+            "integer",
+            "null"
+          ],
+          "minimum": 0
+        },
+        "max_queue_size": {
+          "type": [
+            "integer",
+            "null"
+          ],
+          "exclusiveMinimum": 0
+        },
+        "max_export_batch_size": {
+          "type": [
+            "integer",
+            "null"
+          ],
+          "exclusiveMinimum": 0
+        },
+        "exporter": {
+          "$ref": "#/$defs/LogRecordExporter"
+        }
+      },
+      "required": [
+        "exporter"
+      ]
+    },
+    "LogRecordExporter": {
+      "type": "object",
+      "additionalProperties": true,
+      "minProperties": 1,
+      "maxProperties": 1,
+      "properties": {
+        "otlp_http": {
+          "$ref": "common.json#/$defs/OtlpHttpExporter"
+        },
+        "otlp_grpc": {
+          "$ref": "common.json#/$defs/OtlpGrpcExporter"
+        },
+        "otlp_file/development": {
+          "$ref": "common.json#/$defs/ExperimentalOtlpFileExporter"
+        },
+        "console": {
+          "$ref": "common.json#/$defs/ConsoleExporter"
+        }
+      },
+      "patternProperties": {
+        ".*": {
+          "type": [
+            "object",
+            "null"
+          ]
+        }
+      }
+    },
+    "LogRecordLimits": {
+      "type": "object",
+      "additionalProperties": false,
+      "properties": {
+        "attribute_value_length_limit": {
+          "type": [
+            "integer",
+            "null"
+          ],
+          "minimum": 0
+        },
+        "attribute_count_limit": {
+          "type": [
+            "integer",
+            "null"
+          ],
+          "minimum": 0
+        }
+      }
+    },
+    "LogRecordProcessor": {
+      "type": "object",
+      "additionalProperties": true,
+      "minProperties": 1,
+      "maxProperties": 1,
+      "properties": {
+        "batch": {
+          "$ref": "#/$defs/BatchLogRecordProcessor"
+        },
+        "simple": {
+          "$ref": "#/$defs/SimpleLogRecordProcessor"
+        }
+      },
+      "patternProperties": {
+        ".*": {
+          "type": [
+            "object"
+          ]
+        }
+      }
+    },
+    "ExperimentalLoggerConfigurator": {
+      "type": [
+        "object"
+      ],
+      "additionalProperties": false,
+      "properties": {
+        "default_config": {
+          "$ref": "#/$defs/ExperimentalLoggerConfig"
+        },
+        "loggers": {
+          "type": "array",
+          "items": {
+            "$ref": "#/$defs/ExperimentalLoggerMatcherAndConfig"
+          }
+        }
+      }
+    },
+    "ExperimentalLoggerMatcherAndConfig": {
+      "type": [
+        "object"
+      ],
+      "additionalProperties": false,
+      "properties": {
+        "name": {
+          "type": [
+            "string"
+          ]
+        },
+        "config": {
+          "$ref": "#/$defs/ExperimentalLoggerConfig"
+        }
+      }
+    },
+    "ExperimentalLoggerConfig": {
+      "type": [
+        "object"
+      ],
+      "additionalProperties": false,
+      "properties": {
+        "disabled": {
+          "type": [
+            "boolean"
+          ]
+        }
+      }
+    }
+  }
+}
+
+ +## LogRecordExporter + +`LogRecordExporter` is an [SDK extension plugin](#sdk-extension-plugins). + +| Property | Type | Required? | Constraints | Description | +|---|---|---|---|---| +| `otlp_http` | [`OtlpHttpExporter`](#otlphttpexporter) | `false` | No constraints. | Configure exporter to be OTLP with HTTP transport. | +| `otlp_grpc` | [`OtlpGrpcExporter`](#otlpgrpcexporter) | `false` | No constraints. | Configure exporter to be OTLP with gRPC transport. | +| `otlp_file/development` | [`ExperimentalOtlpFileExporter`](#experimentalotlpfileexporter) | `false` | No constraints. | Configure exporter to be OTLP with file transport.
This type is in development and subject to breaking changes in minor versions.
| +| `console` | [`ConsoleExporter`](#consoleexporter) | `false` | No constraints. | Configure exporter to be console. | + +Constraints: + +* `patternProperties`: `{".*":{"type":["object","null"]}}` +* `additionalProperties`: `true` +* `minProperties`: `1` +* `maxProperties`: `1` + +Usages: + +* [`SimpleLogRecordProcessor.exporter`](#simplelogrecordprocessor) +* [`BatchLogRecordProcessor.exporter`](#batchlogrecordprocessor) + +
+JSON Schema + +[JSON Schema Source File](./schema/logger_provider.json) +
{
+  "type": "object",
+  "additionalProperties": true,
+  "minProperties": 1,
+  "maxProperties": 1,
+  "properties": {
+    "otlp_http": {
+      "$ref": "common.json#/$defs/OtlpHttpExporter"
+    },
+    "otlp_grpc": {
+      "$ref": "common.json#/$defs/OtlpGrpcExporter"
+    },
+    "otlp_file/development": {
+      "$ref": "common.json#/$defs/ExperimentalOtlpFileExporter"
+    },
+    "console": {
+      "$ref": "common.json#/$defs/ConsoleExporter"
+    }
+  },
+  "patternProperties": {
+    ".*": {
+      "type": [
+        "object",
+        "null"
+      ]
+    }
+  }
+}
+
+ +## LogRecordLimits + +| Property | Type | Required? | Constraints | Description | +|---|---|---|---|---| +| `attribute_value_length_limit` | one of:
* `integer`
* `null`
| `false` | * `minimum`: `0`
| Configure max attribute value size. Overrides .attribute_limits.attribute_value_length_limit.
Value must be non-negative.
If omitted or null, there is no limit.
| +| `attribute_count_limit` | one of:
* `integer`
* `null`
| `false` | * `minimum`: `0`
| Configure max attribute count. Overrides .attribute_limits.attribute_count_limit.
Value must be non-negative.
If omitted or null, 128 is used.
| + +Constraints: + +* `additionalProperties`: `false` + +Usages: + +* [`LoggerProvider.limits`](#loggerprovider) + +
+JSON Schema + +[JSON Schema Source File](./schema/logger_provider.json) +
{
+  "type": "object",
+  "additionalProperties": false,
+  "properties": {
+    "attribute_value_length_limit": {
+      "type": [
+        "integer",
+        "null"
+      ],
+      "minimum": 0
+    },
+    "attribute_count_limit": {
+      "type": [
+        "integer",
+        "null"
+      ],
+      "minimum": 0
+    }
+  }
+}
+
+ +## LogRecordProcessor + +`LogRecordProcessor` is an [SDK extension plugin](#sdk-extension-plugins). + +| Property | Type | Required? | Constraints | Description | +|---|---|---|---|---| +| `batch` | [`BatchLogRecordProcessor`](#batchlogrecordprocessor) | `false` | No constraints. | Configure a batch log record processor. | +| `simple` | [`SimpleLogRecordProcessor`](#simplelogrecordprocessor) | `false` | No constraints. | Configure a simple log record processor. | + +Constraints: + +* `patternProperties`: `{".*":{"type":["object"]}}` +* `additionalProperties`: `true` +* `minProperties`: `1` +* `maxProperties`: `1` + +Usages: + +* [`LoggerProvider.processors`](#loggerprovider) + +
+JSON Schema + +[JSON Schema Source File](./schema/logger_provider.json) +
{
+  "type": "object",
+  "additionalProperties": true,
+  "minProperties": 1,
+  "maxProperties": 1,
+  "properties": {
+    "batch": {
+      "$ref": "#/$defs/BatchLogRecordProcessor"
+    },
+    "simple": {
+      "$ref": "#/$defs/SimpleLogRecordProcessor"
+    }
+  },
+  "patternProperties": {
+    ".*": {
+      "type": [
+        "object"
+      ]
+    }
+  }
+}
+
+ +## MeterProvider + +| Property | Type | Required? | Constraints | Description | +|---|---|---|---|---| +| `readers` | `array` of [`MetricReader`](#metricreader) | `true` | No constraints. | 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).
| +| `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` | [`ExperimentalMeterConfigurator`](#experimentalmeterconfigurator) | `false` | No constraints. | Configure meters.
This type is in development and subject to breaking changes in minor versions.
| + +Constraints: + +* `additionalProperties`: `false` +* `required`: `["readers"]` + +Usages: + +* [`OpentelemetryConfiguration.meter_provider`](#opentelemetryconfiguration) + +
+JSON Schema + +[JSON Schema Source File](./schema/meter_provider.json) +
{
+  "$id": "https://opentelemetry.io/otelconfig/meter_provider.json",
+  "$schema": "https://json-schema.org/draft/2020-12/schema",
+  "type": "object",
+  "additionalProperties": false,
+  "properties": {
+    "readers": {
+      "type": "array",
+      "minItems": 1,
+      "items": {
+        "$ref": "#/$defs/MetricReader"
+      }
+    },
+    "views": {
+      "type": "array",
+      "items": {
+        "$ref": "#/$defs/View"
+      }
+    },
+    "exemplar_filter": {
+      "$ref": "#/$defs/ExemplarFilter"
+    },
+    "meter_configurator/development": {
+      "$ref": "#/$defs/ExperimentalMeterConfigurator"
+    }
+  },
+  "required": [
+    "readers"
+  ],
+  "$defs": {
+    "ExemplarFilter": {
+      "type": [
+        "string",
+        "null"
+      ],
+      "enum": [
+        "always_on",
+        "always_off",
+        "trace_based"
+      ]
+    },
+    "PeriodicMetricReader": {
+      "type": "object",
+      "additionalProperties": false,
+      "properties": {
+        "interval": {
+          "type": [
+            "integer",
+            "null"
+          ],
+          "minimum": 0
+        },
+        "timeout": {
+          "type": [
+            "integer",
+            "null"
+          ],
+          "minimum": 0
+        },
+        "exporter": {
+          "$ref": "#/$defs/PushMetricExporter"
+        },
+        "producers": {
+          "type": "array",
+          "items": {
+            "$ref": "#/$defs/MetricProducer"
+          }
+        },
+        "cardinality_limits": {
+          "$ref": "#/$defs/CardinalityLimits"
+        }
+      },
+      "required": [
+        "exporter"
+      ]
+    },
+    "PullMetricReader": {
+      "type": "object",
+      "additionalProperties": false,
+      "properties": {
+        "exporter": {
+          "$ref": "#/$defs/PullMetricExporter"
+        },
+        "producers": {
+          "type": "array",
+          "items": {
+            "$ref": "#/$defs/MetricProducer"
+          }
+        },
+        "cardinality_limits": {
+          "$ref": "#/$defs/CardinalityLimits"
+        }
+      },
+      "required": [
+        "exporter"
+      ]
+    },
+    "CardinalityLimits": {
+      "type": "object",
+      "additionalProperties": false,
+      "properties": {
+        "default": {
+          "type": [
+            "integer",
+            "null"
+          ],
+          "exclusiveMinimum": 0
+        },
+        "counter": {
+          "type": [
+            "integer",
+            "null"
+          ],
+          "exclusiveMinimum": 0
+        },
+        "gauge": {
+          "type": [
+            "integer",
+            "null"
+          ],
+          "exclusiveMinimum": 0
+        },
+        "histogram": {
+          "type": [
+            "integer",
+            "null"
+          ],
+          "exclusiveMinimum": 0
+        },
+        "observable_counter": {
+          "type": [
+            "integer",
+            "null"
+          ],
+          "exclusiveMinimum": 0
+        },
+        "observable_gauge": {
+          "type": [
+            "integer",
+            "null"
+          ],
+          "exclusiveMinimum": 0
+        },
+        "observable_up_down_counter": {
+          "type": [
+            "integer",
+            "null"
+          ],
+          "exclusiveMinimum": 0
+        },
+        "up_down_counter": {
+          "type": [
+            "integer",
+            "null"
+          ],
+          "exclusiveMinimum": 0
+        }
+      }
+    },
+    "PushMetricExporter": {
+      "type": "object",
+      "additionalProperties": true,
+      "minProperties": 1,
+      "maxProperties": 1,
+      "properties": {
+        "otlp_http": {
+          "$ref": "#/$defs/OtlpHttpMetricExporter"
+        },
+        "otlp_grpc": {
+          "$ref": "#/$defs/OtlpGrpcMetricExporter"
+        },
+        "otlp_file/development": {
+          "$ref": "#/$defs/ExperimentalOtlpFileMetricExporter"
+        },
+        "console": {
+          "$ref": "common.json#/$defs/ConsoleExporter"
+        }
+      },
+      "patternProperties": {
+        ".*": {
+          "type": [
+            "object",
+            "null"
+          ]
+        }
+      }
+    },
+    "PullMetricExporter": {
+      "type": [
+        "object"
+      ],
+      "additionalProperties": true,
+      "minProperties": 1,
+      "maxProperties": 1,
+      "properties": {
+        "prometheus/development": {
+          "$ref": "#/$defs/ExperimentalPrometheusMetricExporter"
+        }
+      },
+      "patternProperties": {
+        ".*": {
+          "type": [
+            "object",
+            "null"
+          ]
+        }
+      }
+    },
+    "MetricProducer": {
+      "type": "object",
+      "additionalProperties": true,
+      "minProperties": 1,
+      "maxProperties": 1,
+      "properties": {
+        "opencensus": {
+          "$ref": "#/$defs/OpenCensusMetricProducer"
+        }
+      },
+      "patternProperties": {
+        ".*": {
+          "type": [
+            "object",
+            "null"
+          ]
+        }
+      }
+    },
+    "OpenCensusMetricProducer": {
+      "type": [
+        "object",
+        "null"
+      ],
+      "additionalProperties": false
+    },
+    "ExperimentalPrometheusMetricExporter": {
+      "type": [
+        "object",
+        "null"
+      ],
+      "additionalProperties": false,
+      "properties": {
+        "host": {
+          "type": [
+            "string",
+            "null"
+          ]
+        },
+        "port": {
+          "type": [
+            "integer",
+            "null"
+          ]
+        },
+        "without_scope_info": {
+          "type": [
+            "boolean",
+            "null"
+          ]
+        },
+        "with_resource_constant_labels": {
+          "$ref": "common.json#/$defs/IncludeExclude"
+        },
+        "translation_strategy": {
+          "type": [
+            "string",
+            "null"
+          ],
+          "enum": [
+            "UnderscoreEscapingWithSuffixes",
+            "UnderscoreEscapingWithoutSuffixes",
+            "NoUTF8EscapingWithSuffixes",
+            "NoTranslation"
+          ]
+        }
+      }
+    },
+    "MetricReader": {
+      "type": "object",
+      "additionalProperties": false,
+      "minProperties": 1,
+      "maxProperties": 1,
+      "properties": {
+        "periodic": {
+          "$ref": "#/$defs/PeriodicMetricReader"
+        },
+        "pull": {
+          "$ref": "#/$defs/PullMetricReader"
+        }
+      }
+    },
+    "ExporterTemporalityPreference": {
+      "type": [
+        "string",
+        "null"
+      ],
+      "enum": [
+        "cumulative",
+        "delta",
+        "low_memory"
+      ]
+    },
+    "ExporterDefaultHistogramAggregation": {
+      "type": [
+        "string",
+        "null"
+      ],
+      "enum": [
+        "explicit_bucket_histogram",
+        "base2_exponential_bucket_histogram"
+      ]
+    },
+    "OtlpHttpMetricExporter": {
+      "type": [
+        "object",
+        "null"
+      ],
+      "additionalProperties": false,
+      "properties": {
+        "endpoint": {
+          "type": [
+            "string",
+            "null"
+          ]
+        },
+        "certificate_file": {
+          "type": [
+            "string",
+            "null"
+          ]
+        },
+        "client_key_file": {
+          "type": [
+            "string",
+            "null"
+          ]
+        },
+        "client_certificate_file": {
+          "type": [
+            "string",
+            "null"
+          ]
+        },
+        "headers": {
+          "type": "array",
+          "items": {
+            "$ref": "common.json#/$defs/NameStringValuePair"
+          }
+        },
+        "headers_list": {
+          "type": [
+            "string",
+            "null"
+          ]
+        },
+        "compression": {
+          "type": [
+            "string",
+            "null"
+          ]
+        },
+        "timeout": {
+          "type": [
+            "integer",
+            "null"
+          ],
+          "minimum": 0
+        },
+        "encoding": {
+          "$ref": "common.json#/$defs/OtlpHttpEncoding"
+        },
+        "temporality_preference": {
+          "$ref": "#/$defs/ExporterTemporalityPreference"
+        },
+        "default_histogram_aggregation": {
+          "$ref": "#/$defs/ExporterDefaultHistogramAggregation"
+        }
+      }
+    },
+    "OtlpGrpcMetricExporter": {
+      "type": [
+        "object",
+        "null"
+      ],
+      "additionalProperties": false,
+      "properties": {
+        "endpoint": {
+          "type": [
+            "string",
+            "null"
+          ]
+        },
+        "certificate_file": {
+          "type": [
+            "string",
+            "null"
+          ]
+        },
+        "client_key_file": {
+          "type": [
+            "string",
+            "null"
+          ]
+        },
+        "client_certificate_file": {
+          "type": [
+            "string",
+            "null"
+          ]
+        },
+        "headers": {
+          "type": "array",
+          "items": {
+            "$ref": "common.json#/$defs/NameStringValuePair"
+          }
+        },
+        "headers_list": {
+          "type": [
+            "string",
+            "null"
+          ]
+        },
+        "compression": {
+          "type": [
+            "string",
+            "null"
+          ]
+        },
+        "timeout": {
+          "type": [
+            "integer",
+            "null"
+          ],
+          "minimum": 0
+        },
+        "insecure": {
+          "type": [
+            "boolean",
+            "null"
+          ]
+        },
+        "temporality_preference": {
+          "$ref": "#/$defs/ExporterTemporalityPreference"
+        },
+        "default_histogram_aggregation": {
+          "$ref": "#/$defs/ExporterDefaultHistogramAggregation"
+        }
+      }
+    },
+    "ExperimentalOtlpFileMetricExporter": {
+      "type": [
+        "object",
+        "null"
+      ],
+      "additionalProperties": false,
+      "properties": {
+        "output_stream": {
+          "type": [
+            "string",
+            "null"
+          ]
+        },
+        "temporality_preference": {
+          "$ref": "#/$defs/ExporterTemporalityPreference"
+        },
+        "default_histogram_aggregation": {
+          "$ref": "#/$defs/ExporterDefaultHistogramAggregation"
+        }
+      }
+    },
+    "View": {
+      "type": "object",
+      "additionalProperties": false,
+      "properties": {
+        "selector": {
+          "$ref": "#/$defs/ViewSelector"
+        },
+        "stream": {
+          "$ref": "#/$defs/ViewStream"
+        }
+      }
+    },
+    "ViewSelector": {
+      "type": "object",
+      "additionalProperties": false,
+      "properties": {
+        "instrument_name": {
+          "type": [
+            "string",
+            "null"
+          ]
+        },
+        "instrument_type": {
+          "$ref": "#/$defs/InstrumentType"
+        },
+        "unit": {
+          "type": [
+            "string",
+            "null"
+          ]
+        },
+        "meter_name": {
+          "type": [
+            "string",
+            "null"
+          ]
+        },
+        "meter_version": {
+          "type": [
+            "string",
+            "null"
+          ]
+        },
+        "meter_schema_url": {
+          "type": [
+            "string",
+            "null"
+          ]
+        }
+      }
+    },
+    "InstrumentType": {
+      "type": [
+        "string",
+        "null"
+      ],
+      "enum": [
+        "counter",
+        "gauge",
+        "histogram",
+        "observable_counter",
+        "observable_gauge",
+        "observable_up_down_counter",
+        "up_down_counter"
+      ]
+    },
+    "ViewStream": {
+      "type": "object",
+      "additionalProperties": false,
+      "properties": {
+        "name": {
+          "type": [
+            "string",
+            "null"
+          ]
+        },
+        "description": {
+          "type": [
+            "string",
+            "null"
+          ]
+        },
+        "aggregation": {
+          "$ref": "#/$defs/Aggregation"
+        },
+        "aggregation_cardinality_limit": {
+          "type": [
+            "integer",
+            "null"
+          ],
+          "exclusiveMinimum": 0
+        },
+        "attribute_keys": {
+          "$ref": "common.json#/$defs/IncludeExclude"
+        }
+      }
+    },
+    "Aggregation": {
+      "type": "object",
+      "additionalProperties": false,
+      "minProperties": 1,
+      "maxProperties": 1,
+      "properties": {
+        "default": {
+          "$ref": "#/$defs/DefaultAggregation"
+        },
+        "drop": {
+          "$ref": "#/$defs/DropAggregation"
+        },
+        "explicit_bucket_histogram": {
+          "$ref": "#/$defs/ExplicitBucketHistogramAggregation"
+        },
+        "base2_exponential_bucket_histogram": {
+          "$ref": "#/$defs/Base2ExponentialBucketHistogramAggregation"
+        },
+        "last_value": {
+          "$ref": "#/$defs/LastValueAggregation"
+        },
+        "sum": {
+          "$ref": "#/$defs/SumAggregation"
+        }
+      }
+    },
+    "DefaultAggregation": {
+      "type": [
+        "object",
+        "null"
+      ],
+      "additionalProperties": false
+    },
+    "DropAggregation": {
+      "type": [
+        "object",
+        "null"
+      ],
+      "additionalProperties": false
+    },
+    "ExplicitBucketHistogramAggregation": {
+      "type": [
+        "object",
+        "null"
+      ],
+      "additionalProperties": false,
+      "properties": {
+        "boundaries": {
+          "type": "array",
+          "items": {
+            "type": "number"
+          }
+        },
+        "record_min_max": {
+          "type": [
+            "boolean",
+            "null"
+          ]
+        }
+      }
+    },
+    "Base2ExponentialBucketHistogramAggregation": {
+      "type": [
+        "object",
+        "null"
+      ],
+      "additionalProperties": false,
+      "properties": {
+        "max_scale": {
+          "type": [
+            "integer",
+            "null"
+          ]
+        },
+        "max_size": {
+          "type": [
+            "integer",
+            "null"
+          ]
+        },
+        "record_min_max": {
+          "type": [
+            "boolean",
+            "null"
+          ]
+        }
+      }
+    },
+    "LastValueAggregation": {
+      "type": [
+        "object",
+        "null"
+      ],
+      "additionalProperties": false
+    },
+    "SumAggregation": {
+      "type": [
+        "object",
+        "null"
+      ],
+      "additionalProperties": false
+    },
+    "ExperimentalMeterConfigurator": {
+      "type": [
+        "object"
+      ],
+      "additionalProperties": false,
+      "properties": {
+        "default_config": {
+          "$ref": "#/$defs/ExperimentalMeterConfig"
+        },
+        "meters": {
+          "type": "array",
+          "items": {
+            "$ref": "#/$defs/ExperimentalMeterMatcherAndConfig"
+          }
+        }
+      }
+    },
+    "ExperimentalMeterMatcherAndConfig": {
+      "type": [
+        "object"
+      ],
+      "additionalProperties": false,
+      "properties": {
+        "name": {
+          "type": [
+            "string"
+          ]
+        },
+        "config": {
+          "$ref": "#/$defs/ExperimentalMeterConfig"
+        }
+      }
+    },
+    "ExperimentalMeterConfig": {
+      "type": [
+        "object"
+      ],
+      "additionalProperties": false,
+      "properties": {
+        "disabled": {
+          "type": [
+            "boolean"
+          ]
+        }
+      }
+    }
+  }
+}
+
+ +## MetricProducer + +`MetricProducer` is an [SDK extension plugin](#sdk-extension-plugins). + +| Property | Type | Required? | Constraints | Description | +|---|---|---|---|---| +| `opencensus` | [`OpenCensusMetricProducer`](#opencensusmetricproducer) | `false` | No constraints. | Configure metric producer to be opencensus. | + +Constraints: + +* `patternProperties`: `{".*":{"type":["object","null"]}}` +* `additionalProperties`: `true` +* `minProperties`: `1` +* `maxProperties`: `1` + +Usages: + +* [`PeriodicMetricReader.producers`](#periodicmetricreader) +* [`PullMetricReader.producers`](#pullmetricreader) + +
+JSON Schema + +[JSON Schema Source File](./schema/meter_provider.json) +
{
+  "type": "object",
+  "additionalProperties": true,
+  "minProperties": 1,
+  "maxProperties": 1,
+  "properties": {
+    "opencensus": {
+      "$ref": "#/$defs/OpenCensusMetricProducer"
+    }
+  },
+  "patternProperties": {
+    ".*": {
+      "type": [
+        "object",
+        "null"
+      ]
+    }
+  }
+}
+
+ +## MetricReader + +| Property | Type | Required? | Constraints | Description | +|---|---|---|---|---| +| `periodic` | [`PeriodicMetricReader`](#periodicmetricreader) | `false` | No constraints. | Configure a periodic metric reader. | +| `pull` | [`PullMetricReader`](#pullmetricreader) | `false` | No constraints. | Configure a pull based metric reader. | + +Constraints: + +* `additionalProperties`: `false` +* `minProperties`: `1` +* `maxProperties`: `1` + +Usages: + +* [`MeterProvider.readers`](#meterprovider) + +
+JSON Schema + +[JSON Schema Source File](./schema/meter_provider.json) +
{
+  "type": "object",
+  "additionalProperties": false,
+  "minProperties": 1,
+  "maxProperties": 1,
+  "properties": {
+    "periodic": {
+      "$ref": "#/$defs/PeriodicMetricReader"
+    },
+    "pull": {
+      "$ref": "#/$defs/PullMetricReader"
+    }
+  }
+}
+
+ +## NameStringValuePair + +| Property | Type | Required? | Constraints | Description | +|---|---|---|---|---| +| `name` | `string` | `true` | No constraints. | The name of the pair. | +| `value` | one of:
* `string`
* `null`
| `true` | No constraints. | The value of the pair. | + +Constraints: + +* `additionalProperties`: `false` +* `required`: `["name","value"]` + +Usages: + +* [`OtlpHttpExporter.headers`](#otlphttpexporter) +* [`OtlpGrpcExporter.headers`](#otlpgrpcexporter) +* [`OtlpHttpMetricExporter.headers`](#otlphttpmetricexporter) +* [`OtlpGrpcMetricExporter.headers`](#otlpgrpcmetricexporter) + +
+JSON Schema + +[JSON Schema Source File](./schema/common.json) +
{
+  "type": "object",
+  "additionalProperties": false,
+  "properties": {
+    "name": {
+      "type": "string"
+    },
+    "value": {
+      "type": [
+        "string",
+        "null"
+      ]
+    }
+  },
+  "required": [
+    "name",
+    "value"
+  ]
+}
+
+ +## OpenCensusMetricProducer + +No properties. + +Constraints: + +* `additionalProperties`: `false` + +Usages: + +* [`MetricProducer.opencensus`](#metricproducer) + +
+JSON Schema + +[JSON Schema Source File](./schema/meter_provider.json) +
{
+  "type": [
+    "object",
+    "null"
+  ],
+  "additionalProperties": false
+}
+
+ +## OpentelemetryConfiguration + +| Property | Type | Required? | Constraints | Description | +|---|---|---|---|---| +| `file_format` | `string` | `true` | No constraints. | The file format version.
The yaml format is documented at
https://github.com/open-telemetry/opentelemetry-configuration/tree/main/schema
| +| `disabled` | one of:
* `boolean`
* `null`
| `false` | No constraints. | Configure if the SDK is disabled or not.
If omitted or null, false is used.
| +| `log_level` | one of:
* `string`
* `null`
| `false` | No constraints. | Configure the log level of the internal logger used by the SDK.
If omitted, info is used.
| +| `attribute_limits` | [`AttributeLimits`](#attributelimits) | `false` | No constraints. | Configure general attribute limits. See also tracer_provider.limits, logger_provider.limits.
| +| `logger_provider` | [`LoggerProvider`](#loggerprovider) | `false` | No constraints. | Configure logger provider.
If omitted, a noop logger provider is used.
| +| `meter_provider` | [`MeterProvider`](#meterprovider) | `false` | No constraints. | Configure meter provider.
If omitted, a noop meter provider is used.
| +| `propagator` | [`Propagator`](#propagator) | `false` | No constraints. | Configure text map context propagators.
If omitted, a noop propagator is used.
| +| `tracer_provider` | [`TracerProvider`](#tracerprovider) | `false` | No constraints. | Configure tracer provider.
If omitted, a noop tracer provider is used.
| +| `resource` | [`Resource`](#resource) | `false` | No constraints. | Configure resource for all signals.
If omitted, the default resource is used.
| +| `instrumentation/development` | [`ExperimentalInstrumentation`](#experimentalinstrumentation) | `false` | No constraints. | Configure instrumentation.
This type is in development and subject to breaking changes in minor versions.
| + +Constraints: + +* `additionalProperties`: `true` +* `required`: `["file_format"]` + +No usages. + +
+JSON Schema + +[JSON Schema Source File](./schema/opentelemetry_configuration.json) +
{
+  "$id": "https://opentelemetry.io/otelconfig/opentelemetry_configuration.json",
+  "$schema": "https://json-schema.org/draft/2020-12/schema",
+  "title": "OpenTelemetryConfiguration",
+  "type": "object",
+  "additionalProperties": true,
+  "properties": {
+    "file_format": {
+      "type": "string"
+    },
+    "disabled": {
+      "type": [
+        "boolean",
+        "null"
+      ]
+    },
+    "log_level": {
+      "type": [
+        "string",
+        "null"
+      ]
+    },
+    "attribute_limits": {
+      "$ref": "#/$defs/AttributeLimits"
+    },
+    "logger_provider": {
+      "$ref": "#/$defs/LoggerProvider"
+    },
+    "meter_provider": {
+      "$ref": "#/$defs/MeterProvider"
+    },
+    "propagator": {
+      "$ref": "#/$defs/Propagator"
+    },
+    "tracer_provider": {
+      "$ref": "#/$defs/TracerProvider"
+    },
+    "resource": {
+      "$ref": "#/$defs/Resource"
+    },
+    "instrumentation/development": {
+      "$ref": "#/$defs/ExperimentalInstrumentation"
+    }
+  },
+  "required": [
+    "file_format"
+  ],
+  "$defs": {
+    "AttributeLimits": {
+      "type": "object",
+      "additionalProperties": true,
+      "properties": {
+        "attribute_value_length_limit": {
+          "type": [
+            "integer",
+            "null"
+          ]
+        },
+        "attribute_count_limit": {
+          "type": [
+            "integer",
+            "null"
+          ]
+        }
+      }
+    },
+    "LoggerProvider": {
+      "$ref": "logger_provider.json"
+    },
+    "MeterProvider": {
+      "$ref": "meter_provider.json"
+    },
+    "TracerProvider": {
+      "$ref": "tracer_provider.json"
+    },
+    "Propagator": {
+      "$ref": "propagator.json"
+    },
+    "Resource": {
+      "$ref": "resource.json"
+    },
+    "ExperimentalInstrumentation": {
+      "$ref": "instrumentation.json"
+    }
+  }
+}
+
+ +## OpenTracingPropagator + +No properties. + +Constraints: + +* `additionalProperties`: `false` + +Usages: + +* [`TextMapPropagator.ottrace`](#textmappropagator) + +
+JSON Schema + +[JSON Schema Source File](./schema/propagator.json) +
{
+  "type": [
+    "object",
+    "null"
+  ],
+  "additionalProperties": false
+}
+
+ +## OtlpGrpcExporter + +| Property | Type | Required? | Constraints | Description | +|---|---|---|---|---| +| `endpoint` | one of:
* `string`
* `null`
| `false` | No constraints. | Configure endpoint.
If omitted or null, http://localhost:4317 is used.
| +| `certificate_file` | one of:
* `string`
* `null`
| `false` | No constraints. | Configure certificate used to verify a server's TLS credentials.
Absolute path to certificate file in PEM format.
If omitted or null, system default certificate verification is used for secure connections.
| +| `client_key_file` | one of:
* `string`
* `null`
| `false` | No constraints. | Configure mTLS private client key.
Absolute path to client key file in PEM format. If set, .client_certificate must also be set.
If omitted or null, mTLS is not used.
| +| `client_certificate_file` | one of:
* `string`
* `null`
| `false` | No constraints. | Configure mTLS client certificate.
Absolute path to client certificate file in PEM format. If set, .client_key must also be set.
If omitted or null, mTLS is not 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_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.
| +| `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.
| +| `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.
| +| `insecure` | one of:
* `boolean`
* `null`
| `false` | No constraints. | Configure client transport security for the exporter's connection.
Only applicable when .endpoint is provided without http or https scheme. Implementations may choose to ignore .insecure.
If omitted or null, false is used.
| + +Constraints: + +* `additionalProperties`: `false` + +Usages: + +* [`LogRecordExporter.otlp_grpc`](#logrecordexporter) +* [`SpanExporter.otlp_grpc`](#spanexporter) + +
+JSON Schema + +[JSON Schema Source File](./schema/common.json) +
{
+  "type": [
+    "object",
+    "null"
+  ],
+  "additionalProperties": false,
+  "properties": {
+    "endpoint": {
+      "type": [
+        "string",
+        "null"
+      ]
+    },
+    "certificate_file": {
+      "type": [
+        "string",
+        "null"
+      ]
+    },
+    "client_key_file": {
+      "type": [
+        "string",
+        "null"
+      ]
+    },
+    "client_certificate_file": {
+      "type": [
+        "string",
+        "null"
+      ]
+    },
+    "headers": {
+      "type": "array",
+      "items": {
+        "$ref": "common.json#/$defs/NameStringValuePair"
+      }
+    },
+    "headers_list": {
+      "type": [
+        "string",
+        "null"
+      ]
+    },
+    "compression": {
+      "type": [
+        "string",
+        "null"
+      ]
+    },
+    "timeout": {
+      "type": [
+        "integer",
+        "null"
+      ],
+      "minimum": 0
+    },
+    "insecure": {
+      "type": [
+        "boolean",
+        "null"
+      ]
+    }
+  }
+}
+
+ +## OtlpGrpcMetricExporter + +| Property | Type | Required? | Constraints | Description | +|---|---|---|---|---| +| `endpoint` | one of:
* `string`
* `null`
| `false` | No constraints. | Configure endpoint.
If omitted or null, http://localhost:4317 is used.
| +| `certificate_file` | one of:
* `string`
* `null`
| `false` | No constraints. | Configure certificate used to verify a server's TLS credentials.
Absolute path to certificate file in PEM format.
If omitted or null, system default certificate verification is used for secure connections.
| +| `client_key_file` | one of:
* `string`
* `null`
| `false` | No constraints. | Configure mTLS private client key.
Absolute path to client key file in PEM format. If set, .client_certificate must also be set.
If omitted or null, mTLS is not used.
| +| `client_certificate_file` | one of:
* `string`
* `null`
| `false` | No constraints. | Configure mTLS client certificate.
Absolute path to client certificate file in PEM format. If set, .client_key must also be set.
If omitted or null, mTLS is not 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_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.
| +| `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.
| +| `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.
| +| `insecure` | one of:
* `boolean`
* `null`
| `false` | No constraints. | Configure client transport security for the exporter's connection.
Only applicable when .endpoint is provided without http or https scheme. Implementations may choose to ignore .insecure.
If omitted or null, false is used.
| +| `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.
| +| `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.
| + +Constraints: + +* `additionalProperties`: `false` + +Usages: + +* [`PushMetricExporter.otlp_grpc`](#pushmetricexporter) + +
+JSON Schema + +[JSON Schema Source File](./schema/meter_provider.json) +
{
+  "type": [
+    "object",
+    "null"
+  ],
+  "additionalProperties": false,
+  "properties": {
+    "endpoint": {
+      "type": [
+        "string",
+        "null"
+      ]
+    },
+    "certificate_file": {
+      "type": [
+        "string",
+        "null"
+      ]
+    },
+    "client_key_file": {
+      "type": [
+        "string",
+        "null"
+      ]
+    },
+    "client_certificate_file": {
+      "type": [
+        "string",
+        "null"
+      ]
+    },
+    "headers": {
+      "type": "array",
+      "items": {
+        "$ref": "common.json#/$defs/NameStringValuePair"
+      }
+    },
+    "headers_list": {
+      "type": [
+        "string",
+        "null"
+      ]
+    },
+    "compression": {
+      "type": [
+        "string",
+        "null"
+      ]
+    },
+    "timeout": {
+      "type": [
+        "integer",
+        "null"
+      ],
+      "minimum": 0
+    },
+    "insecure": {
+      "type": [
+        "boolean",
+        "null"
+      ]
+    },
+    "temporality_preference": {
+      "$ref": "#/$defs/ExporterTemporalityPreference"
+    },
+    "default_histogram_aggregation": {
+      "$ref": "#/$defs/ExporterDefaultHistogramAggregation"
+    }
+  }
+}
+
+ +## OtlpHttpEncoding + +No properties. + +Constraints: + +* `enum`: `["protobuf","json"]` + +Usages: + +* [`OtlpHttpExporter.encoding`](#otlphttpexporter) +* [`OtlpHttpMetricExporter.encoding`](#otlphttpmetricexporter) + +
+JSON Schema + +[JSON Schema Source File](./schema/common.json) +
{
+  "type": [
+    "string",
+    "null"
+  ],
+  "enum": [
+    "protobuf",
+    "json"
+  ]
+}
+
+ +## OtlpHttpExporter + +| Property | Type | Required? | Constraints | Description | +|---|---|---|---|---| +| `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.
| +| `certificate_file` | one of:
* `string`
* `null`
| `false` | No constraints. | Configure certificate used to verify a server's TLS credentials.
Absolute path to certificate file in PEM format.
If omitted or null, system default certificate verification is used for secure connections.
| +| `client_key_file` | one of:
* `string`
* `null`
| `false` | No constraints. | Configure mTLS private client key.
Absolute path to client key file in PEM format. If set, .client_certificate must also be set.
If omitted or null, mTLS is not used.
| +| `client_certificate_file` | one of:
* `string`
* `null`
| `false` | No constraints. | Configure mTLS client certificate.
Absolute path to client certificate file in PEM format. If set, .client_key must also be set.
If omitted or null, mTLS is not 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_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.
| +| `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.
| +| `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.
| +| `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.
| + +Constraints: + +* `additionalProperties`: `false` + +Usages: + +* [`LogRecordExporter.otlp_http`](#logrecordexporter) +* [`SpanExporter.otlp_http`](#spanexporter) + +
+JSON Schema + +[JSON Schema Source File](./schema/common.json) +
{
+  "type": [
+    "object",
+    "null"
+  ],
+  "additionalProperties": false,
+  "properties": {
+    "endpoint": {
+      "type": [
+        "string",
+        "null"
+      ]
+    },
+    "certificate_file": {
+      "type": [
+        "string",
+        "null"
+      ]
+    },
+    "client_key_file": {
+      "type": [
+        "string",
+        "null"
+      ]
+    },
+    "client_certificate_file": {
+      "type": [
+        "string",
+        "null"
+      ]
+    },
+    "headers": {
+      "type": "array",
+      "items": {
+        "$ref": "#/$defs/NameStringValuePair"
+      }
+    },
+    "headers_list": {
+      "type": [
+        "string",
+        "null"
+      ]
+    },
+    "compression": {
+      "type": [
+        "string",
+        "null"
+      ]
+    },
+    "timeout": {
+      "type": [
+        "integer",
+        "null"
+      ],
+      "minimum": 0
+    },
+    "encoding": {
+      "$ref": "#/$defs/OtlpHttpEncoding"
+    }
+  }
+}
+
+ +## OtlpHttpMetricExporter + +| Property | Type | Required? | Constraints | Description | +|---|---|---|---|---| +| `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.
| +| `certificate_file` | one of:
* `string`
* `null`
| `false` | No constraints. | Configure certificate used to verify a server's TLS credentials.
Absolute path to certificate file in PEM format.
If omitted or null, system default certificate verification is used for secure connections.
| +| `client_key_file` | one of:
* `string`
* `null`
| `false` | No constraints. | Configure mTLS private client key.
Absolute path to client key file in PEM format. If set, .client_certificate must also be set.
If omitted or null, mTLS is not used.
| +| `client_certificate_file` | one of:
* `string`
* `null`
| `false` | No constraints. | Configure mTLS client certificate.
Absolute path to client certificate file in PEM format. If set, .client_key must also be set.
If omitted or null, mTLS is not 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_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.
| +| `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.
| +| `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.
| +| `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.
| +| `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.
| +| `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.
| + +Constraints: + +* `additionalProperties`: `false` + +Usages: + +* [`PushMetricExporter.otlp_http`](#pushmetricexporter) + +
+JSON Schema + +[JSON Schema Source File](./schema/meter_provider.json) +
{
+  "type": [
+    "object",
+    "null"
+  ],
+  "additionalProperties": false,
+  "properties": {
+    "endpoint": {
+      "type": [
+        "string",
+        "null"
+      ]
+    },
+    "certificate_file": {
+      "type": [
+        "string",
+        "null"
+      ]
+    },
+    "client_key_file": {
+      "type": [
+        "string",
+        "null"
+      ]
+    },
+    "client_certificate_file": {
+      "type": [
+        "string",
+        "null"
+      ]
+    },
+    "headers": {
+      "type": "array",
+      "items": {
+        "$ref": "common.json#/$defs/NameStringValuePair"
+      }
+    },
+    "headers_list": {
+      "type": [
+        "string",
+        "null"
+      ]
+    },
+    "compression": {
+      "type": [
+        "string",
+        "null"
+      ]
+    },
+    "timeout": {
+      "type": [
+        "integer",
+        "null"
+      ],
+      "minimum": 0
+    },
+    "encoding": {
+      "$ref": "common.json#/$defs/OtlpHttpEncoding"
+    },
+    "temporality_preference": {
+      "$ref": "#/$defs/ExporterTemporalityPreference"
+    },
+    "default_histogram_aggregation": {
+      "$ref": "#/$defs/ExporterDefaultHistogramAggregation"
+    }
+  }
+}
+
+ +## ParentBasedSampler + +| Property | Type | Required? | Constraints | Description | +|---|---|---|---|---| +| `root` | [`Sampler`](#sampler) | `false` | No constraints. | Configure root sampler.
If omitted or null, always_on is used.
| +| `remote_parent_sampled` | [`Sampler`](#sampler) | `false` | No constraints. | Configure remote_parent_sampled sampler.
If omitted or null, always_on is used.
| +| `remote_parent_not_sampled` | [`Sampler`](#sampler) | `false` | No constraints. | Configure remote_parent_not_sampled sampler.
If omitted or null, always_off is used.
| +| `local_parent_sampled` | [`Sampler`](#sampler) | `false` | No constraints. | Configure local_parent_sampled sampler.
If omitted or null, always_on is used.
| +| `local_parent_not_sampled` | [`Sampler`](#sampler) | `false` | No constraints. | Configure local_parent_not_sampled sampler.
If omitted or null, always_off is used.
| + +Constraints: + +* `additionalProperties`: `false` + +Usages: + +* [`Sampler.parent_based`](#sampler) + +
+JSON Schema + +[JSON Schema Source File](./schema/tracer_provider.json) +
{
+  "type": [
+    "object",
+    "null"
+  ],
+  "additionalProperties": false,
+  "properties": {
+    "root": {
+      "$ref": "#/$defs/Sampler"
+    },
+    "remote_parent_sampled": {
+      "$ref": "#/$defs/Sampler"
+    },
+    "remote_parent_not_sampled": {
+      "$ref": "#/$defs/Sampler"
+    },
+    "local_parent_sampled": {
+      "$ref": "#/$defs/Sampler"
+    },
+    "local_parent_not_sampled": {
+      "$ref": "#/$defs/Sampler"
+    }
+  }
+}
+
+ +## PeriodicMetricReader + +| Property | Type | Required? | Constraints | Description | +|---|---|---|---|---| +| `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.
| +| `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.
| +| `exporter` | [`PushMetricExporter`](#pushmetricexporter) | `true` | No constraints. | Configure exporter. | +| `producers` | `array` of [`MetricProducer`](#metricproducer) | `false` | No constraints. | Configure metric producers. | +| `cardinality_limits` | [`CardinalityLimits`](#cardinalitylimits) | `false` | No constraints. | Configure cardinality limits. | + +Constraints: + +* `additionalProperties`: `false` +* `required`: `["exporter"]` + +Usages: + +* [`MetricReader.periodic`](#metricreader) + +
+JSON Schema + +[JSON Schema Source File](./schema/meter_provider.json) +
{
+  "type": "object",
+  "additionalProperties": false,
+  "properties": {
+    "interval": {
+      "type": [
+        "integer",
+        "null"
+      ],
+      "minimum": 0
+    },
+    "timeout": {
+      "type": [
+        "integer",
+        "null"
+      ],
+      "minimum": 0
+    },
+    "exporter": {
+      "$ref": "#/$defs/PushMetricExporter"
+    },
+    "producers": {
+      "type": "array",
+      "items": {
+        "$ref": "#/$defs/MetricProducer"
+      }
+    },
+    "cardinality_limits": {
+      "$ref": "#/$defs/CardinalityLimits"
+    }
+  },
+  "required": [
+    "exporter"
+  ]
+}
+
+ +## Propagator + +| 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_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.
| + +No constraints. + +Usages: + +* [`OpentelemetryConfiguration.propagator`](#opentelemetryconfiguration) + +
+JSON Schema + +[JSON Schema Source File](./schema/propagator.json) +
{
+  "$id": "https://opentelemetry.io/otelconfig/propagator.json",
+  "$schema": "https://json-schema.org/draft/2020-12/schema",
+  "type": "object",
+  "properties": {
+    "composite": {
+      "type": "array",
+      "items": {
+        "$ref": "#/$defs/TextMapPropagator"
+      }
+    },
+    "composite_list": {
+      "type": [
+        "string",
+        "null"
+      ]
+    }
+  },
+  "$defs": {
+    "TextMapPropagator": {
+      "type": "object",
+      "additionalProperties": true,
+      "minProperties": 1,
+      "maxProperties": 1,
+      "properties": {
+        "tracecontext": {
+          "$ref": "#/$defs/TraceContextPropagator"
+        },
+        "baggage": {
+          "$ref": "#/$defs/BaggagePropagator"
+        },
+        "b3": {
+          "$ref": "#/$defs/B3Propagator"
+        },
+        "b3multi": {
+          "$ref": "#/$defs/B3MultiPropagator"
+        },
+        "jaeger": {
+          "$ref": "#/$defs/JaegerPropagator"
+        },
+        "ottrace": {
+          "$ref": "#/$defs/OpenTracingPropagator"
+        }
+      },
+      "patternProperties": {
+        ".*": {
+          "type": [
+            "object",
+            "null"
+          ]
+        }
+      }
+    },
+    "TraceContextPropagator": {
+      "type": [
+        "object",
+        "null"
+      ],
+      "additionalProperties": false
+    },
+    "BaggagePropagator": {
+      "type": [
+        "object",
+        "null"
+      ],
+      "additionalProperties": false
+    },
+    "B3Propagator": {
+      "type": [
+        "object",
+        "null"
+      ],
+      "additionalProperties": false
+    },
+    "B3MultiPropagator": {
+      "type": [
+        "object",
+        "null"
+      ],
+      "additionalProperties": false
+    },
+    "JaegerPropagator": {
+      "type": [
+        "object",
+        "null"
+      ],
+      "additionalProperties": false
+    },
+    "OpenTracingPropagator": {
+      "type": [
+        "object",
+        "null"
+      ],
+      "additionalProperties": false
+    }
+  }
+}
+
+ +## PullMetricExporter + +`PullMetricExporter` is an [SDK extension plugin](#sdk-extension-plugins). + +| Property | Type | Required? | Constraints | Description | +|---|---|---|---|---| +| `prometheus/development` | [`ExperimentalPrometheusMetricExporter`](#experimentalprometheusmetricexporter) | `false` | No constraints. | Configure exporter to be prometheus.
This type is in development and subject to breaking changes in minor versions.
| + +Constraints: + +* `patternProperties`: `{".*":{"type":["object","null"]}}` +* `additionalProperties`: `true` +* `minProperties`: `1` +* `maxProperties`: `1` + +Usages: + +* [`PullMetricReader.exporter`](#pullmetricreader) + +
+JSON Schema + +[JSON Schema Source File](./schema/meter_provider.json) +
{
+  "type": [
+    "object"
+  ],
+  "additionalProperties": true,
+  "minProperties": 1,
+  "maxProperties": 1,
+  "properties": {
+    "prometheus/development": {
+      "$ref": "#/$defs/ExperimentalPrometheusMetricExporter"
+    }
+  },
+  "patternProperties": {
+    ".*": {
+      "type": [
+        "object",
+        "null"
+      ]
+    }
+  }
+}
+
+ +## PullMetricReader + +| Property | Type | Required? | Constraints | Description | +|---|---|---|---|---| +| `exporter` | [`PullMetricExporter`](#pullmetricexporter) | `true` | No constraints. | Configure exporter. | +| `producers` | `array` of [`MetricProducer`](#metricproducer) | `false` | No constraints. | Configure metric producers. | +| `cardinality_limits` | [`CardinalityLimits`](#cardinalitylimits) | `false` | No constraints. | Configure cardinality limits. | + +Constraints: + +* `additionalProperties`: `false` +* `required`: `["exporter"]` + +Usages: + +* [`MetricReader.pull`](#metricreader) + +
+JSON Schema + +[JSON Schema Source File](./schema/meter_provider.json) +
{
+  "type": "object",
+  "additionalProperties": false,
+  "properties": {
+    "exporter": {
+      "$ref": "#/$defs/PullMetricExporter"
+    },
+    "producers": {
+      "type": "array",
+      "items": {
+        "$ref": "#/$defs/MetricProducer"
+      }
+    },
+    "cardinality_limits": {
+      "$ref": "#/$defs/CardinalityLimits"
+    }
+  },
+  "required": [
+    "exporter"
+  ]
+}
+
+ +## PushMetricExporter + +`PushMetricExporter` is an [SDK extension plugin](#sdk-extension-plugins). + +| Property | Type | Required? | Constraints | Description | +|---|---|---|---|---| +| `otlp_http` | [`OtlpHttpMetricExporter`](#otlphttpmetricexporter) | `false` | No constraints. | Configure exporter to be OTLP with HTTP transport.
| +| `otlp_grpc` | [`OtlpGrpcMetricExporter`](#otlpgrpcmetricexporter) | `false` | No constraints. | Configure exporter to be OTLP with gRPC transport.
| +| `otlp_file/development` | [`ExperimentalOtlpFileMetricExporter`](#experimentalotlpfilemetricexporter) | `false` | No constraints. | Configure exporter to be OTLP with file transport.
This type is in development and subject to breaking changes in minor versions.
| +| `console` | [`ConsoleExporter`](#consoleexporter) | `false` | No constraints. | Configure exporter to be console.
| + +Constraints: + +* `patternProperties`: `{".*":{"type":["object","null"]}}` +* `additionalProperties`: `true` +* `minProperties`: `1` +* `maxProperties`: `1` + +Usages: + +* [`PeriodicMetricReader.exporter`](#periodicmetricreader) + +
+JSON Schema + +[JSON Schema Source File](./schema/meter_provider.json) +
{
+  "type": "object",
+  "additionalProperties": true,
+  "minProperties": 1,
+  "maxProperties": 1,
+  "properties": {
+    "otlp_http": {
+      "$ref": "#/$defs/OtlpHttpMetricExporter"
+    },
+    "otlp_grpc": {
+      "$ref": "#/$defs/OtlpGrpcMetricExporter"
+    },
+    "otlp_file/development": {
+      "$ref": "#/$defs/ExperimentalOtlpFileMetricExporter"
+    },
+    "console": {
+      "$ref": "common.json#/$defs/ConsoleExporter"
+    }
+  },
+  "patternProperties": {
+    ".*": {
+      "type": [
+        "object",
+        "null"
+      ]
+    }
+  }
+}
+
+ +## Resource + +| 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.
| +| `detection/development` | [`ExperimentalResourceDetection`](#experimentalresourcedetection) | `false` | No constraints. | Configure resource detection.
This type is in development and subject to breaking changes in minor versions.
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.
| +| `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.
| + +Constraints: + +* `additionalProperties`: `false` + +Usages: + +* [`OpentelemetryConfiguration.resource`](#opentelemetryconfiguration) + +
+JSON Schema + +[JSON Schema Source File](./schema/resource.json) +
{
+  "$id": "https://opentelemetry.io/otelconfig/resource.json",
+  "$schema": "https://json-schema.org/draft/2020-12/schema",
+  "type": "object",
+  "additionalProperties": false,
+  "properties": {
+    "attributes": {
+      "type": "array",
+      "items": {
+        "$ref": "#/$defs/AttributeNameValue"
+      }
+    },
+    "detection/development": {
+      "$ref": "#/$defs/ExperimentalResourceDetection"
+    },
+    "schema_url": {
+      "type": [
+        "string",
+        "null"
+      ]
+    },
+    "attributes_list": {
+      "type": [
+        "string",
+        "null"
+      ]
+    }
+  },
+  "$defs": {
+    "AttributeNameValue": {
+      "type": "object",
+      "additionalProperties": false,
+      "properties": {
+        "name": {
+          "type": "string"
+        },
+        "value": {
+          "oneOf": [
+            {
+              "type": "string"
+            },
+            {
+              "type": "number"
+            },
+            {
+              "type": "boolean"
+            },
+            {
+              "type": "null"
+            },
+            {
+              "type": "array",
+              "items": {
+                "type": "string"
+              }
+            },
+            {
+              "type": "array",
+              "items": {
+                "type": "boolean"
+              }
+            },
+            {
+              "type": "array",
+              "items": {
+                "type": "number"
+              }
+            }
+          ]
+        },
+        "type": {
+          "$ref": "#/$defs/AttributeType"
+        }
+      },
+      "required": [
+        "name",
+        "value"
+      ]
+    },
+    "AttributeType": {
+      "type": [
+        "string",
+        "null"
+      ],
+      "enum": [
+        null,
+        "string",
+        "bool",
+        "int",
+        "double",
+        "string_array",
+        "bool_array",
+        "int_array",
+        "double_array"
+      ]
+    },
+    "ExperimentalResourceDetection": {
+      "type": "object",
+      "additionalProperties": false,
+      "properties": {
+        "attributes": {
+          "$ref": "common.json#/$defs/IncludeExclude"
+        },
+        "detectors": {
+          "type": "array",
+          "items": {
+            "$ref": "#/$defs/ExperimentalResourceDetector"
+          }
+        }
+      }
+    },
+    "ExperimentalResourceDetector": {
+      "type": "object",
+      "additionalProperties": true,
+      "minProperties": 1,
+      "maxProperties": 1,
+      "properties": {
+        "container": {
+          "$ref": "#/$defs/ExperimentalContainerResourceDetector"
+        },
+        "host": {
+          "$ref": "#/$defs/ExperimentalHostResourceDetector"
+        },
+        "process": {
+          "$ref": "#/$defs/ExperimentalProcessResourceDetector"
+        },
+        "service": {
+          "$ref": "#/$defs/ExperimentalServiceResourceDetector"
+        }
+      },
+      "patternProperties": {
+        ".*": {
+          "type": [
+            "object",
+            "null"
+          ]
+        }
+      }
+    },
+    "ExperimentalContainerResourceDetector": {
+      "type": [
+        "object",
+        "null"
+      ],
+      "additionalProperties": false
+    },
+    "ExperimentalHostResourceDetector": {
+      "type": [
+        "object",
+        "null"
+      ],
+      "additionalProperties": false
+    },
+    "ExperimentalProcessResourceDetector": {
+      "type": [
+        "object",
+        "null"
+      ],
+      "additionalProperties": false
+    },
+    "ExperimentalServiceResourceDetector": {
+      "type": [
+        "object",
+        "null"
+      ],
+      "additionalProperties": false
+    }
+  }
+}
+
+ +## Sampler + +`Sampler` is an [SDK extension plugin](#sdk-extension-plugins). + +| Property | Type | Required? | Constraints | Description | +|---|---|---|---|---| +| `always_off` | [`AlwaysOffSampler`](#alwaysoffsampler) | `false` | No constraints. | Configure sampler to be always_off. | +| `always_on` | [`AlwaysOnSampler`](#alwaysonsampler) | `false` | No constraints. | Configure sampler to be always_on. | +| `jaeger_remote` | [`JaegerRemoteSampler`](#jaegerremotesampler) | `false` | No constraints. | TODO | +| `parent_based` | [`ParentBasedSampler`](#parentbasedsampler) | `false` | No constraints. | Configure sampler to be parent_based. | +| `trace_id_ratio_based` | [`TraceIdRatioBasedSampler`](#traceidratiobasedsampler) | `false` | No constraints. | Configure sampler to be trace_id_ratio_based. | + +Constraints: + +* `patternProperties`: `{".*":{"type":["object","null"]}}` +* `additionalProperties`: `true` +* `minProperties`: `1` +* `maxProperties`: `1` + +Usages: + +* [`TracerProvider.sampler`](#tracerprovider) +* [`JaegerRemoteSampler.initial_sampler`](#jaegerremotesampler) +* [`ParentBasedSampler.root`](#parentbasedsampler) +* [`ParentBasedSampler.remote_parent_sampled`](#parentbasedsampler) +* [`ParentBasedSampler.remote_parent_not_sampled`](#parentbasedsampler) +* [`ParentBasedSampler.local_parent_sampled`](#parentbasedsampler) +* [`ParentBasedSampler.local_parent_not_sampled`](#parentbasedsampler) + +
+JSON Schema + +[JSON Schema Source File](./schema/tracer_provider.json) +
{
+  "type": "object",
+  "additionalProperties": true,
+  "minProperties": 1,
+  "maxProperties": 1,
+  "properties": {
+    "always_off": {
+      "$ref": "#/$defs/AlwaysOffSampler"
+    },
+    "always_on": {
+      "$ref": "#/$defs/AlwaysOnSampler"
+    },
+    "jaeger_remote": {
+      "$ref": "#/$defs/JaegerRemoteSampler"
+    },
+    "parent_based": {
+      "$ref": "#/$defs/ParentBasedSampler"
+    },
+    "trace_id_ratio_based": {
+      "$ref": "#/$defs/TraceIdRatioBasedSampler"
+    }
+  },
+  "patternProperties": {
+    ".*": {
+      "type": [
+        "object",
+        "null"
+      ]
+    }
+  }
+}
+
+ +## SimpleLogRecordProcessor + +| Property | Type | Required? | Constraints | Description | +|---|---|---|---|---| +| `exporter` | [`LogRecordExporter`](#logrecordexporter) | `true` | No constraints. | Configure exporter. | + +Constraints: + +* `additionalProperties`: `false` +* `required`: `["exporter"]` + +Usages: + +* [`LogRecordProcessor.simple`](#logrecordprocessor) + +
+JSON Schema + +[JSON Schema Source File](./schema/logger_provider.json) +
{
+  "type": "object",
+  "additionalProperties": false,
+  "properties": {
+    "exporter": {
+      "$ref": "#/$defs/LogRecordExporter"
+    }
+  },
+  "required": [
+    "exporter"
+  ]
+}
+
+ +## SimpleSpanProcessor + +| Property | Type | Required? | Constraints | Description | +|---|---|---|---|---| +| `exporter` | [`SpanExporter`](#spanexporter) | `true` | No constraints. | Configure exporter. | + +Constraints: + +* `additionalProperties`: `false` +* `required`: `["exporter"]` + +Usages: + +* [`SpanProcessor.simple`](#spanprocessor) + +
+JSON Schema + +[JSON Schema Source File](./schema/tracer_provider.json) +
{
+  "type": "object",
+  "additionalProperties": false,
+  "properties": {
+    "exporter": {
+      "$ref": "#/$defs/SpanExporter"
+    }
+  },
+  "required": [
+    "exporter"
+  ]
+}
+
+ +## SpanExporter + +`SpanExporter` is an [SDK extension plugin](#sdk-extension-plugins). + +| Property | Type | Required? | Constraints | Description | +|---|---|---|---|---| +| `otlp_http` | [`OtlpHttpExporter`](#otlphttpexporter) | `false` | No constraints. | Configure exporter to be OTLP with HTTP transport. | +| `otlp_grpc` | [`OtlpGrpcExporter`](#otlpgrpcexporter) | `false` | No constraints. | Configure exporter to be OTLP with gRPC transport. | +| `otlp_file/development` | [`ExperimentalOtlpFileExporter`](#experimentalotlpfileexporter) | `false` | No constraints. | Configure exporter to be OTLP with file transport.
This type is in development and subject to breaking changes in minor versions.
| +| `console` | [`ConsoleExporter`](#consoleexporter) | `false` | No constraints. | Configure exporter to be console. | +| `zipkin` | [`ZipkinSpanExporter`](#zipkinspanexporter) | `false` | No constraints. | Configure exporter to be zipkin. | + +Constraints: + +* `patternProperties`: `{".*":{"type":["object","null"]}}` +* `additionalProperties`: `true` +* `minProperties`: `1` +* `maxProperties`: `1` + +Usages: + +* [`BatchSpanProcessor.exporter`](#batchspanprocessor) +* [`SimpleSpanProcessor.exporter`](#simplespanprocessor) + +
+JSON Schema + +[JSON Schema Source File](./schema/tracer_provider.json) +
{
+  "type": "object",
+  "additionalProperties": true,
+  "minProperties": 1,
+  "maxProperties": 1,
+  "properties": {
+    "otlp_http": {
+      "$ref": "common.json#/$defs/OtlpHttpExporter"
+    },
+    "otlp_grpc": {
+      "$ref": "common.json#/$defs/OtlpGrpcExporter"
+    },
+    "otlp_file/development": {
+      "$ref": "common.json#/$defs/ExperimentalOtlpFileExporter"
+    },
+    "console": {
+      "$ref": "common.json#/$defs/ConsoleExporter"
+    },
+    "zipkin": {
+      "$ref": "#/$defs/ZipkinSpanExporter"
+    }
+  },
+  "patternProperties": {
+    ".*": {
+      "type": [
+        "object",
+        "null"
+      ]
+    }
+  }
+}
+
+ +## SpanLimits + +| Property | Type | Required? | Constraints | Description | +|---|---|---|---|---| +| `attribute_value_length_limit` | one of:
* `integer`
* `null`
| `false` | * `minimum`: `0`
| Configure max attribute value size. Overrides .attribute_limits.attribute_value_length_limit.
Value must be non-negative.
If omitted or null, there is no limit.
| +| `attribute_count_limit` | one of:
* `integer`
* `null`
| `false` | * `minimum`: `0`
| Configure max attribute count. Overrides .attribute_limits.attribute_count_limit.
Value must be non-negative.
If omitted or null, 128 is used.
| +| `event_count_limit` | one of:
* `integer`
* `null`
| `false` | * `minimum`: `0`
| Configure max span event count.
Value must be non-negative.
If omitted or null, 128 is used.
| +| `link_count_limit` | one of:
* `integer`
* `null`
| `false` | * `minimum`: `0`
| Configure max span link count.
Value must be non-negative.
If omitted or null, 128 is used.
| +| `event_attribute_count_limit` | one of:
* `integer`
* `null`
| `false` | * `minimum`: `0`
| Configure max attributes per span event.
Value must be non-negative.
If omitted or null, 128 is used.
| +| `link_attribute_count_limit` | one of:
* `integer`
* `null`
| `false` | * `minimum`: `0`
| Configure max attributes per span link.
Value must be non-negative.
If omitted or null, 128 is used.
| + +Constraints: + +* `additionalProperties`: `false` + +Usages: + +* [`TracerProvider.limits`](#tracerprovider) + +
+JSON Schema + +[JSON Schema Source File](./schema/tracer_provider.json) +
{
+  "type": "object",
+  "additionalProperties": false,
+  "properties": {
+    "attribute_value_length_limit": {
+      "type": [
+        "integer",
+        "null"
+      ],
+      "minimum": 0
+    },
+    "attribute_count_limit": {
+      "type": [
+        "integer",
+        "null"
+      ],
+      "minimum": 0
+    },
+    "event_count_limit": {
+      "type": [
+        "integer",
+        "null"
+      ],
+      "minimum": 0
+    },
+    "link_count_limit": {
+      "type": [
+        "integer",
+        "null"
+      ],
+      "minimum": 0
+    },
+    "event_attribute_count_limit": {
+      "type": [
+        "integer",
+        "null"
+      ],
+      "minimum": 0
+    },
+    "link_attribute_count_limit": {
+      "type": [
+        "integer",
+        "null"
+      ],
+      "minimum": 0
+    }
+  }
+}
+
+ +## SpanProcessor + +`SpanProcessor` is an [SDK extension plugin](#sdk-extension-plugins). + +| Property | Type | Required? | Constraints | Description | +|---|---|---|---|---| +| `batch` | [`BatchSpanProcessor`](#batchspanprocessor) | `false` | No constraints. | Configure a batch span processor. | +| `simple` | [`SimpleSpanProcessor`](#simplespanprocessor) | `false` | No constraints. | Configure a simple span processor. | + +Constraints: + +* `patternProperties`: `{".*":{"type":["object","null"]}}` +* `additionalProperties`: `true` +* `minProperties`: `1` +* `maxProperties`: `1` + +Usages: + +* [`TracerProvider.processors`](#tracerprovider) + +
+JSON Schema + +[JSON Schema Source File](./schema/tracer_provider.json) +
{
+  "type": "object",
+  "additionalProperties": true,
+  "minProperties": 1,
+  "maxProperties": 1,
+  "properties": {
+    "batch": {
+      "$ref": "#/$defs/BatchSpanProcessor"
+    },
+    "simple": {
+      "$ref": "#/$defs/SimpleSpanProcessor"
+    }
+  },
+  "patternProperties": {
+    ".*": {
+      "type": [
+        "object",
+        "null"
+      ]
+    }
+  }
+}
+
+ +## SumAggregation + +No properties. + +Constraints: + +* `additionalProperties`: `false` + +Usages: + +* [`Aggregation.sum`](#aggregation) + +
+JSON Schema + +[JSON Schema Source File](./schema/meter_provider.json) +
{
+  "type": [
+    "object",
+    "null"
+  ],
+  "additionalProperties": false
+}
+
+ +## TextMapPropagator + +`TextMapPropagator` is an [SDK extension plugin](#sdk-extension-plugins). + +| Property | Type | Required? | Constraints | Description | +|---|---|---|---|---| +| `tracecontext` | [`TraceContextPropagator`](#tracecontextpropagator) | `false` | No constraints. | Include the w3c trace context propagator. | +| `baggage` | [`BaggagePropagator`](#baggagepropagator) | `false` | No constraints. | Include the w3c baggage propagator. | +| `b3` | [`B3Propagator`](#b3propagator) | `false` | No constraints. | Include the zipkin b3 propagator. | +| `b3multi` | [`B3MultiPropagator`](#b3multipropagator) | `false` | No constraints. | Include the zipkin b3 multi propagator. | +| `jaeger` | [`JaegerPropagator`](#jaegerpropagator) | `false` | No constraints. | Include the jaeger propagator. | +| `ottrace` | [`OpenTracingPropagator`](#opentracingpropagator) | `false` | No constraints. | Include the opentracing propagator. | + +Constraints: + +* `patternProperties`: `{".*":{"type":["object","null"]}}` +* `additionalProperties`: `true` +* `minProperties`: `1` +* `maxProperties`: `1` + +Usages: + +* [`Propagator.composite`](#propagator) + +
+JSON Schema + +[JSON Schema Source File](./schema/propagator.json) +
{
+  "type": "object",
+  "additionalProperties": true,
+  "minProperties": 1,
+  "maxProperties": 1,
+  "properties": {
+    "tracecontext": {
+      "$ref": "#/$defs/TraceContextPropagator"
+    },
+    "baggage": {
+      "$ref": "#/$defs/BaggagePropagator"
+    },
+    "b3": {
+      "$ref": "#/$defs/B3Propagator"
+    },
+    "b3multi": {
+      "$ref": "#/$defs/B3MultiPropagator"
+    },
+    "jaeger": {
+      "$ref": "#/$defs/JaegerPropagator"
+    },
+    "ottrace": {
+      "$ref": "#/$defs/OpenTracingPropagator"
+    }
+  },
+  "patternProperties": {
+    ".*": {
+      "type": [
+        "object",
+        "null"
+      ]
+    }
+  }
+}
+
+ +## TraceContextPropagator + +No properties. + +Constraints: + +* `additionalProperties`: `false` + +Usages: + +* [`TextMapPropagator.tracecontext`](#textmappropagator) + +
+JSON Schema + +[JSON Schema Source File](./schema/propagator.json) +
{
+  "type": [
+    "object",
+    "null"
+  ],
+  "additionalProperties": false
+}
+
+ +## TraceIdRatioBasedSampler + +| Property | Type | Required? | Constraints | Description | +|---|---|---|---|---| +| `ratio` | one of:
* `number`
* `null`
| `false` | No constraints. | Configure trace_id_ratio.
If omitted or null, 1.0 is used.
| + +Constraints: + +* `additionalProperties`: `false` + +Usages: + +* [`Sampler.trace_id_ratio_based`](#sampler) + +
+JSON Schema + +[JSON Schema Source File](./schema/tracer_provider.json) +
{
+  "type": [
+    "object",
+    "null"
+  ],
+  "additionalProperties": false,
+  "properties": {
+    "ratio": {
+      "type": [
+        "number",
+        "null"
+      ]
+    }
+  }
+}
+
+ +## TracerProvider + +| Property | Type | Required? | Constraints | Description | +|---|---|---|---|---| +| `processors` | `array` of [`SpanProcessor`](#spanprocessor) | `true` | No constraints. | Configure span processors. | +| `limits` | [`SpanLimits`](#spanlimits) | `false` | No constraints. | Configure span limits. See also attribute_limits. | +| `sampler` | [`Sampler`](#sampler) | `false` | No constraints. | Configure the sampler.
If omitted, parent based sampler with a root of always_on is used.
| +| `tracer_configurator/development` | [`ExperimentalTracerConfigurator`](#experimentaltracerconfigurator) | `false` | No constraints. | Configure tracers.
This type is in development and subject to breaking changes in minor versions.
| + +Constraints: + +* `additionalProperties`: `false` +* `required`: `["processors"]` + +Usages: + +* [`OpentelemetryConfiguration.tracer_provider`](#opentelemetryconfiguration) + +
+JSON Schema + +[JSON Schema Source File](./schema/tracer_provider.json) +
{
+  "$id": "https://opentelemetry.io/otelconfig/tracer_provider.json",
+  "$schema": "https://json-schema.org/draft/2020-12/schema",
+  "type": "object",
+  "additionalProperties": false,
+  "properties": {
+    "processors": {
+      "type": "array",
+      "minItems": 1,
+      "items": {
+        "$ref": "#/$defs/SpanProcessor"
+      }
+    },
+    "limits": {
+      "$ref": "#/$defs/SpanLimits"
+    },
+    "sampler": {
+      "$ref": "#/$defs/Sampler"
+    },
+    "tracer_configurator/development": {
+      "$ref": "#/$defs/ExperimentalTracerConfigurator"
+    }
+  },
+  "required": [
+    "processors"
+  ],
+  "$defs": {
+    "BatchSpanProcessor": {
+      "type": "object",
+      "additionalProperties": false,
+      "properties": {
+        "schedule_delay": {
+          "type": [
+            "integer",
+            "null"
+          ],
+          "minimum": 0
+        },
+        "export_timeout": {
+          "type": [
+            "integer",
+            "null"
+          ],
+          "minimum": 0
+        },
+        "max_queue_size": {
+          "type": [
+            "integer",
+            "null"
+          ],
+          "exclusiveMinimum": 0
+        },
+        "max_export_batch_size": {
+          "type": [
+            "integer",
+            "null"
+          ],
+          "exclusiveMinimum": 0
+        },
+        "exporter": {
+          "$ref": "#/$defs/SpanExporter"
+        }
+      },
+      "required": [
+        "exporter"
+      ]
+    },
+    "Sampler": {
+      "type": "object",
+      "additionalProperties": true,
+      "minProperties": 1,
+      "maxProperties": 1,
+      "properties": {
+        "always_off": {
+          "$ref": "#/$defs/AlwaysOffSampler"
+        },
+        "always_on": {
+          "$ref": "#/$defs/AlwaysOnSampler"
+        },
+        "jaeger_remote": {
+          "$ref": "#/$defs/JaegerRemoteSampler"
+        },
+        "parent_based": {
+          "$ref": "#/$defs/ParentBasedSampler"
+        },
+        "trace_id_ratio_based": {
+          "$ref": "#/$defs/TraceIdRatioBasedSampler"
+        }
+      },
+      "patternProperties": {
+        ".*": {
+          "type": [
+            "object",
+            "null"
+          ]
+        }
+      }
+    },
+    "AlwaysOffSampler": {
+      "type": [
+        "object",
+        "null"
+      ],
+      "additionalProperties": false
+    },
+    "AlwaysOnSampler": {
+      "type": [
+        "object",
+        "null"
+      ],
+      "additionalProperties": false
+    },
+    "JaegerRemoteSampler": {
+      "type": [
+        "object",
+        "null"
+      ],
+      "additionalProperties": false,
+      "properties": {
+        "endpoint": {
+          "type": [
+            "string",
+            "null"
+          ]
+        },
+        "interval": {
+          "type": [
+            "integer",
+            "null"
+          ],
+          "minimum": 0
+        },
+        "initial_sampler": {
+          "$ref": "#/$defs/Sampler"
+        }
+      }
+    },
+    "ParentBasedSampler": {
+      "type": [
+        "object",
+        "null"
+      ],
+      "additionalProperties": false,
+      "properties": {
+        "root": {
+          "$ref": "#/$defs/Sampler"
+        },
+        "remote_parent_sampled": {
+          "$ref": "#/$defs/Sampler"
+        },
+        "remote_parent_not_sampled": {
+          "$ref": "#/$defs/Sampler"
+        },
+        "local_parent_sampled": {
+          "$ref": "#/$defs/Sampler"
+        },
+        "local_parent_not_sampled": {
+          "$ref": "#/$defs/Sampler"
+        }
+      }
+    },
+    "TraceIdRatioBasedSampler": {
+      "type": [
+        "object",
+        "null"
+      ],
+      "additionalProperties": false,
+      "properties": {
+        "ratio": {
+          "type": [
+            "number",
+            "null"
+          ]
+        }
+      }
+    },
+    "SimpleSpanProcessor": {
+      "type": "object",
+      "additionalProperties": false,
+      "properties": {
+        "exporter": {
+          "$ref": "#/$defs/SpanExporter"
+        }
+      },
+      "required": [
+        "exporter"
+      ]
+    },
+    "SpanExporter": {
+      "type": "object",
+      "additionalProperties": true,
+      "minProperties": 1,
+      "maxProperties": 1,
+      "properties": {
+        "otlp_http": {
+          "$ref": "common.json#/$defs/OtlpHttpExporter"
+        },
+        "otlp_grpc": {
+          "$ref": "common.json#/$defs/OtlpGrpcExporter"
+        },
+        "otlp_file/development": {
+          "$ref": "common.json#/$defs/ExperimentalOtlpFileExporter"
+        },
+        "console": {
+          "$ref": "common.json#/$defs/ConsoleExporter"
+        },
+        "zipkin": {
+          "$ref": "#/$defs/ZipkinSpanExporter"
+        }
+      },
+      "patternProperties": {
+        ".*": {
+          "type": [
+            "object",
+            "null"
+          ]
+        }
+      }
+    },
+    "SpanLimits": {
+      "type": "object",
+      "additionalProperties": false,
+      "properties": {
+        "attribute_value_length_limit": {
+          "type": [
+            "integer",
+            "null"
+          ],
+          "minimum": 0
+        },
+        "attribute_count_limit": {
+          "type": [
+            "integer",
+            "null"
+          ],
+          "minimum": 0
+        },
+        "event_count_limit": {
+          "type": [
+            "integer",
+            "null"
+          ],
+          "minimum": 0
+        },
+        "link_count_limit": {
+          "type": [
+            "integer",
+            "null"
+          ],
+          "minimum": 0
+        },
+        "event_attribute_count_limit": {
+          "type": [
+            "integer",
+            "null"
+          ],
+          "minimum": 0
+        },
+        "link_attribute_count_limit": {
+          "type": [
+            "integer",
+            "null"
+          ],
+          "minimum": 0
+        }
+      }
+    },
+    "SpanProcessor": {
+      "type": "object",
+      "additionalProperties": true,
+      "minProperties": 1,
+      "maxProperties": 1,
+      "properties": {
+        "batch": {
+          "$ref": "#/$defs/BatchSpanProcessor"
+        },
+        "simple": {
+          "$ref": "#/$defs/SimpleSpanProcessor"
+        }
+      },
+      "patternProperties": {
+        ".*": {
+          "type": [
+            "object",
+            "null"
+          ]
+        }
+      }
+    },
+    "ZipkinSpanExporter": {
+      "type": [
+        "object",
+        "null"
+      ],
+      "additionalProperties": false,
+      "properties": {
+        "endpoint": {
+          "type": [
+            "string",
+            "null"
+          ]
+        },
+        "timeout": {
+          "type": [
+            "integer",
+            "null"
+          ],
+          "minimum": 0
+        }
+      }
+    },
+    "ExperimentalTracerConfigurator": {
+      "type": [
+        "object"
+      ],
+      "additionalProperties": false,
+      "properties": {
+        "default_config": {
+          "$ref": "#/$defs/ExperimentalTracerConfig"
+        },
+        "tracers": {
+          "type": "array",
+          "items": {
+            "$ref": "#/$defs/ExperimentalTracerMatcherAndConfig"
+          }
+        }
+      }
+    },
+    "ExperimentalTracerMatcherAndConfig": {
+      "type": [
+        "object"
+      ],
+      "additionalProperties": false,
+      "properties": {
+        "name": {
+          "type": [
+            "string"
+          ]
+        },
+        "config": {
+          "$ref": "#/$defs/ExperimentalTracerConfig"
+        }
+      }
+    },
+    "ExperimentalTracerConfig": {
+      "type": [
+        "object"
+      ],
+      "additionalProperties": false,
+      "properties": {
+        "disabled": {
+          "type": [
+            "boolean"
+          ]
+        }
+      }
+    }
+  }
+}
+
+ +## View + +| Property | Type | Required? | Constraints | Description | +|---|---|---|---|---| +| `selector` | [`ViewSelector`](#viewselector) | `false` | No constraints. | 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` | [`ViewStream`](#viewstream) | `false` | No constraints. | Configure view stream. | + +Constraints: + +* `additionalProperties`: `false` + +Usages: + +* [`MeterProvider.views`](#meterprovider) + +
+JSON Schema + +[JSON Schema Source File](./schema/meter_provider.json) +
{
+  "type": "object",
+  "additionalProperties": false,
+  "properties": {
+    "selector": {
+      "$ref": "#/$defs/ViewSelector"
+    },
+    "stream": {
+      "$ref": "#/$defs/ViewStream"
+    }
+  }
+}
+
+ +## ViewSelector + +| Property | Type | Required? | Constraints | Description | +|---|---|---|---|---| +| `instrument_name` | one of:
* `string`
* `null`
| `false` | No constraints. | Configure instrument name selection criteria.
If omitted or null, all instrument names match.
| +| `instrument_type` | [`InstrumentType`](#instrumenttype) | `false` | No constraints. | Configure instrument type selection criteria.
Values include: counter, gauge, histogram, observable_counter, observable_gauge, observable_up_down_counter, up_down_counter.
If omitted or null, all instrument types match.
| +| `unit` | one of:
* `string`
* `null`
| `false` | No constraints. | Configure the instrument unit selection criteria.
If omitted or null, all instrument units match.
| +| `meter_name` | one of:
* `string`
* `null`
| `false` | No constraints. | Configure meter name selection criteria.
If omitted or null, all meter names match.
| +| `meter_version` | one of:
* `string`
* `null`
| `false` | No constraints. | Configure meter version selection criteria.
If omitted or null, all meter versions match.
| +| `meter_schema_url` | one of:
* `string`
* `null`
| `false` | No constraints. | Configure meter schema url selection criteria.
If omitted or null, all meter schema URLs match.
| + +Constraints: + +* `additionalProperties`: `false` + +Usages: + +* [`View.selector`](#view) + +
+JSON Schema + +[JSON Schema Source File](./schema/meter_provider.json) +
{
+  "type": "object",
+  "additionalProperties": false,
+  "properties": {
+    "instrument_name": {
+      "type": [
+        "string",
+        "null"
+      ]
+    },
+    "instrument_type": {
+      "$ref": "#/$defs/InstrumentType"
+    },
+    "unit": {
+      "type": [
+        "string",
+        "null"
+      ]
+    },
+    "meter_name": {
+      "type": [
+        "string",
+        "null"
+      ]
+    },
+    "meter_version": {
+      "type": [
+        "string",
+        "null"
+      ]
+    },
+    "meter_schema_url": {
+      "type": [
+        "string",
+        "null"
+      ]
+    }
+  }
+}
+
+ +## ViewStream + +| Property | Type | Required? | Constraints | Description | +|---|---|---|---|---| +| `name` | one of:
* `string`
* `null`
| `false` | No constraints. | Configure metric name of the resulting stream(s).
If omitted or null, the instrument's original name is used.
| +| `description` | one of:
* `string`
* `null`
| `false` | No constraints. | Configure metric description of the resulting stream(s).
If omitted or null, the instrument's origin description is used.
| +| `aggregation` | [`Aggregation`](#aggregation) | `false` | No constraints. | 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_cardinality_limit` | one of:
* `integer`
* `null`
| `false` | * `exclusiveMinimum`: `0`
| Configure the aggregation cardinality limit.
If omitted or null, the metric reader's default cardinality limit is used.
| +| `attribute_keys` | [`IncludeExclude`](#includeexclude) | `false` | No constraints. | Configure attribute keys retained in the resulting stream(s).
| + +Constraints: + +* `additionalProperties`: `false` + +Usages: + +* [`View.stream`](#view) + +
+JSON Schema + +[JSON Schema Source File](./schema/meter_provider.json) +
{
+  "type": "object",
+  "additionalProperties": false,
+  "properties": {
+    "name": {
+      "type": [
+        "string",
+        "null"
+      ]
+    },
+    "description": {
+      "type": [
+        "string",
+        "null"
+      ]
+    },
+    "aggregation": {
+      "$ref": "#/$defs/Aggregation"
+    },
+    "aggregation_cardinality_limit": {
+      "type": [
+        "integer",
+        "null"
+      ],
+      "exclusiveMinimum": 0
+    },
+    "attribute_keys": {
+      "$ref": "common.json#/$defs/IncludeExclude"
+    }
+  }
+}
+
+ +## ZipkinSpanExporter + +| Property | Type | Required? | Constraints | Description | +|---|---|---|---|---| +| `endpoint` | one of:
* `string`
* `null`
| `false` | No constraints. | Configure endpoint.
If omitted or null, http://localhost:9411/api/v2/spans 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 indefinite.
If omitted or null, 10000 is used.
| + +Constraints: + +* `additionalProperties`: `false` + +Usages: + +* [`SpanExporter.zipkin`](#spanexporter) + +
+JSON Schema + +[JSON Schema Source File](./schema/tracer_provider.json) +
{
+  "type": [
+    "object",
+    "null"
+  ],
+  "additionalProperties": false,
+  "properties": {
+    "endpoint": {
+      "type": [
+        "string",
+        "null"
+      ]
+    },
+    "timeout": {
+      "type": [
+        "integer",
+        "null"
+      ],
+      "minimum": 0
+    }
+  }
+}
+
+ +# SDK Extension Plugins + +[SDK extension plugins](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/configuration/sdk.md#supported-sdk-extension-plugins) are places where custom interface implementations can be referenced and configured. + +For example, you could write a custom `SpanExporter`, and indicate that it should be paired with a `BatchSpanProcessor`. + +Each of the following types support referencing custom interface implementations. Each type is an object type containing exactly one property whose value is type `object` or `null`. The property key refers to the name of the custom implementation, and must be the same as the `name` of a corresponding registered [ComponentProvider](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/configuration/sdk.md#register-componentprovider). The value passed as configuration when the [ComponentProvider.create](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/configuration/sdk.md#create) is called. + +SDK extension plugin types may have properties defined corresponding to built-in implementations of the interface. For example, the `otlp_http` property of `SpanExporter` defines the OTLP http/protobuf exporter. + +* [ExperimentalResourceDetector](#ExperimentalResourceDetector) +* [LogRecordExporter](#LogRecordExporter) +* [LogRecordProcessor](#LogRecordProcessor) +* [MetricProducer](#MetricProducer) +* [PullMetricExporter](#PullMetricExporter) +* [PushMetricExporter](#PushMetricExporter) +* [Sampler](#Sampler) +* [SpanExporter](#SpanExporter) +* [SpanProcessor](#SpanProcessor) +* [TextMapPropagator](#TextMapPropagator) diff --git a/schema/instrumentation.json b/schema/instrumentation.json index b698ddd4..e9f6d408 100644 --- a/schema/instrumentation.json +++ b/schema/instrumentation.json @@ -66,20 +66,59 @@ "service_mapping": { "type": "array", "items": { - "type": "object", - "additionalProperties": false, - "properties": { - "peer": { - "type": "string" - }, - "service": { - "type": "string" - } - }, - "required": [ - "peer", - "service" - ] + "$ref": "#/$defs/ExperimentalPeerServiceMapping" + } + } + } + }, + "ExperimentalPeerServiceMapping": { + "type": "object", + "additionalProperties": false, + "properties": { + "peer": { + "type": "string" + }, + "service": { + "type": "string" + } + }, + "required": [ + "peer", + "service" + ] + }, + "ExperimentalHttpClientInstrumentation": { + "type": "object", + "additionalProperties": false, + "properties": { + "request_captured_headers": { + "type": "array", + "items": { + "type": "string" + } + }, + "response_captured_headers": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "ExperimentalHttpServerInstrumentation": { + "type": "object", + "additionalProperties": false, + "properties": { + "request_captured_headers": { + "type": "array", + "items": { + "type": "string" + } + }, + "response_captured_headers": { + "type": "array", + "items": { + "type": "string" } } } @@ -89,40 +128,10 @@ "additionalProperties": false, "properties": { "client": { - "type": "object", - "additionalProperties": false, - "properties": { - "request_captured_headers": { - "type": "array", - "items": { - "type": "string" - } - }, - "response_captured_headers": { - "type": "array", - "items": { - "type": "string" - } - } - } + "$ref": "#/$defs/ExperimentalHttpClientInstrumentation" }, "server": { - "type": "object", - "additionalProperties": false, - "properties": { - "request_captured_headers": { - "type": "array", - "items": { - "type": "string" - } - }, - "response_captured_headers": { - "type": "array", - "items": { - "type": "string" - } - } - } + "$ref": "#/$defs/ExperimentalHttpServerInstrumentation" } } }, diff --git a/schema/meta_schema.yaml b/schema/meta_schema.yaml new file mode 100644 index 00000000..2cbcef83 --- /dev/null +++ b/schema/meta_schema.yaml @@ -0,0 +1,1121 @@ +- type: Aggregation + properties: + - property: default + description: TODO + - property: drop + description: TODO + - property: explicit_bucket_histogram + description: Configure aggregation to be explicit_bucket_histogram. + - property: base2_exponential_bucket_histogram + description: TODO + - property: last_value + description: TODO + - property: sum + description: TODO + isSdkExtensionPlugin: false +- type: AlwaysOffSampler + properties: [] + isSdkExtensionPlugin: false +- type: AlwaysOnSampler + properties: [] + isSdkExtensionPlugin: false +- type: AttributeLimits + properties: + - property: attribute_value_length_limit + description: | + Configure max attribute value size. + Value must be non-negative. + If omitted or null, there is no limit. + - property: attribute_count_limit + description: | + Configure max attribute count. + Value must be non-negative. + If omitted or null, 128 is used. + isSdkExtensionPlugin: false +- type: AttributeNameValue + properties: + - property: name + description: | + The attribute name. + - property: value + description: | + The attribute value. + The type of value must match .type. + - property: type + description: | + The attribute type. + Values include: string, bool, int, double, string_array, bool_array, int_array, double_array. + If omitted or null, string is used. + isSdkExtensionPlugin: false +- type: AttributeType + properties: [] + isSdkExtensionPlugin: false +- type: B3MultiPropagator + properties: [] + isSdkExtensionPlugin: false +- type: B3Propagator + properties: [] + isSdkExtensionPlugin: false +- type: BaggagePropagator + properties: [] + isSdkExtensionPlugin: false +- type: Base2ExponentialBucketHistogramAggregation + properties: + - property: max_scale + description: TODO + - property: max_size + description: TODO + - property: record_min_max + description: TODO + isSdkExtensionPlugin: false +- type: BatchLogRecordProcessor + properties: + - property: schedule_delay + description: | + Configure delay interval (in milliseconds) between two consecutive exports. + Value must be non-negative. + If omitted or null, 1000 is used. + - property: export_timeout + description: | + 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. + - property: max_queue_size + description: | + Configure maximum queue size. Value must be positive. + If omitted or null, 2048 is used. + - property: max_export_batch_size + description: | + Configure maximum batch size. Value must be positive. + If omitted or null, 512 is used. + - property: exporter + description: Configure exporter. + isSdkExtensionPlugin: false +- type: BatchSpanProcessor + properties: + - property: schedule_delay + description: | + Configure delay interval (in milliseconds) between two consecutive exports. + Value must be non-negative. + If omitted or null, 5000 is used. + - property: export_timeout + description: | + 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. + - property: max_queue_size + description: | + Configure maximum queue size. Value must be positive. + If omitted or null, 2048 is used. + - property: max_export_batch_size + description: | + Configure maximum batch size. Value must be positive. + If omitted or null, 512 is used. + - property: exporter + description: Configure exporter. + isSdkExtensionPlugin: false +- type: CardinalityLimits + properties: + - property: default + description: | + Configure default cardinality limit for all instrument types. + Instrument-specific cardinality limits take priority. + If omitted or null, 2000 is used. + - property: counter + description: | + Configure default cardinality limit for counter instruments. + If omitted or null, the value from .default is used. + - property: gauge + description: | + Configure default cardinality limit for gauge instruments. + If omitted or null, the value from .default is used. + - property: histogram + description: | + Configure default cardinality limit for histogram instruments. + If omitted or null, the value from .default is used. + - property: observable_counter + description: | + Configure default cardinality limit for observable_counter instruments. + If omitted or null, the value from .default is used. + - property: observable_gauge + description: | + Configure default cardinality limit for observable_gauge instruments. + If omitted or null, the value from .default is used. + - property: observable_up_down_counter + description: | + Configure default cardinality limit for observable_up_down_counter instruments. + If omitted or null, the value from .default is used. + - property: up_down_counter + description: | + Configure default cardinality limit for up_down_counter instruments. + If omitted or null, the value from .default is used. + isSdkExtensionPlugin: false +- type: ConsoleExporter + properties: [] + isSdkExtensionPlugin: false +- type: DefaultAggregation + properties: [] + isSdkExtensionPlugin: false +- type: DropAggregation + properties: [] + isSdkExtensionPlugin: false +- type: ExemplarFilter + properties: [] + isSdkExtensionPlugin: false +- type: ExperimentalContainerResourceDetector + properties: [] + isSdkExtensionPlugin: false +- type: ExperimentalGeneralInstrumentation + properties: + - property: peer + description: | + Configure instrumentations following the peer semantic conventions. + See peer semantic conventions: https://opentelemetry.io/docs/specs/semconv/attributes-registry/peer/ + - property: http + description: | + Configure instrumentations following the http semantic conventions. + See http semantic conventions: https://opentelemetry.io/docs/specs/semconv/http/ + isSdkExtensionPlugin: false +- type: ExperimentalHostResourceDetector + properties: [] + isSdkExtensionPlugin: false +- type: ExperimentalHttpClientInstrumentation + properties: + - property: request_captured_headers + description: | + Configure headers to capture for outbound http requests. + - property: response_captured_headers + description: | + Configure headers to capture for inbound http responses. + isSdkExtensionPlugin: false +- type: ExperimentalHttpInstrumentation + properties: + - property: client + description: Configure instrumentations following the http client semantic conventions. + - property: server + description: Configure instrumentations following the http server semantic conventions. + isSdkExtensionPlugin: false +- type: ExperimentalHttpServerInstrumentation + properties: + - property: request_captured_headers + description: | + Configure headers to capture for inbound http requests. + - property: response_captured_headers + description: | + Configure headers to capture for outbound http responses. + isSdkExtensionPlugin: false +- type: ExperimentalInstrumentation + properties: + - property: general + description: | + Configure general SemConv options that may apply to multiple languages and instrumentations. + Instrumenation may merge general config options with the language specific configuration at .instrumentation.. + - property: cpp + description: Configure C++ language-specific instrumentation libraries. + - property: dotnet + description: | + Configure .NET language-specific instrumentation libraries. + Each entry's key identifies a particular instrumentation library. The corresponding value configures it. + - property: erlang + description: | + Configure Erlang language-specific instrumentation libraries. + Each entry's key identifies a particular instrumentation library. The corresponding value configures it. + - property: go + description: | + Configure Go language-specific instrumentation libraries. + Each entry's key identifies a particular instrumentation library. The corresponding value configures it. + - property: java + description: | + Configure Java language-specific instrumentation libraries. + Each entry's key identifies a particular instrumentation library. The corresponding value configures it. + - property: js + description: | + Configure JavaScript language-specific instrumentation libraries. + Each entry's key identifies a particular instrumentation library. The corresponding value configures it. + - property: php + description: | + Configure PHP language-specific instrumentation libraries. + Each entry's key identifies a particular instrumentation library. The corresponding value configures it. + - property: python + description: | + Configure Python language-specific instrumentation libraries. + Each entry's key identifies a particular instrumentation library. The corresponding value configures it. + - property: ruby + description: | + Configure Ruby language-specific instrumentation libraries. + Each entry's key identifies a particular instrumentation library. The corresponding value configures it. + - property: rust + description: | + Configure Rust language-specific instrumentation libraries. + Each entry's key identifies a particular instrumentation library. The corresponding value configures it. + - property: swift + description: | + Configure Swift language-specific instrumentation libraries. + Each entry's key identifies a particular instrumentation library. The corresponding value configures it. + isSdkExtensionPlugin: false +- type: ExperimentalLanguageSpecificInstrumentation + properties: [] + isSdkExtensionPlugin: false +- type: ExperimentalLoggerConfig + properties: + - property: disabled + description: Configure if the logger is enabled or not. + isSdkExtensionPlugin: false +- type: ExperimentalLoggerConfigurator + properties: + - property: default_config + description: Configure the default logger config used there is no matching entry in .logger_configurator/development.loggers. + - property: loggers + description: Configure loggers. + isSdkExtensionPlugin: false +- type: ExperimentalLoggerMatcherAndConfig + properties: + - property: name + description: | + Configure logger names to match, evaluated as follows: + + * If the logger name exactly matches. + * If the logger name matches the wildcard pattern, where '?' matches any single character and '*' matches any number of characters including none. + - property: config + description: The logger config. + isSdkExtensionPlugin: false +- type: ExperimentalMeterConfig + properties: + - property: disabled + description: Configure if the meter is enabled or not. + isSdkExtensionPlugin: false +- type: ExperimentalMeterConfigurator + properties: + - property: default_config + description: Configure the default meter config used there is no matching entry in .meter_configurator/development.meters. + - property: meters + description: Configure meters. + isSdkExtensionPlugin: false +- type: ExperimentalMeterMatcherAndConfig + properties: + - property: name + description: | + Configure meter names to match, evaluated as follows: + + * If the meter name exactly matches. + * If the meter name matches the wildcard pattern, where '?' matches any single character and '*' matches any number of characters including none. + - property: config + description: The meter config. + isSdkExtensionPlugin: false +- type: ExperimentalOtlpFileExporter + properties: + - property: output_stream + description: | + Configure output stream. + Values include stdout, or scheme+destination. For example: file:///path/to/file.jsonl. + If omitted or null, stdout is used. + isSdkExtensionPlugin: false +- type: ExperimentalOtlpFileMetricExporter + properties: + - property: output_stream + description: | + Configure output stream. + Values include stdout, or scheme+destination. For example: file:///path/to/file.jsonl. + If omitted or null, stdout is used. + - property: temporality_preference + description: | + 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. + - property: default_histogram_aggregation + description: | + 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. + isSdkExtensionPlugin: false +- type: ExperimentalPeerInstrumentation + properties: + - property: service_mapping + description: | + 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 + isSdkExtensionPlugin: false +- type: ExperimentalPeerServiceMapping + properties: + - property: peer + description: | + The IP address to map. + - property: service + description: | + The logical name corresponding to the IP address of .peer. + isSdkExtensionPlugin: false +- type: ExperimentalProcessResourceDetector + properties: [] + isSdkExtensionPlugin: false +- type: ExperimentalPrometheusMetricExporter + properties: + - property: host + description: | + Configure host. + If omitted or null, localhost is used. + - property: port + description: | + Configure port. + If omitted or null, 9464 is used. + - property: without_scope_info + description: | + Configure Prometheus Exporter to produce metrics without a scope info metric. + If omitted or null, false is used. + - property: with_resource_constant_labels + description: Configure Prometheus Exporter to add resource attributes as metrics attributes, where the resource attribute keys match the patterns. + - property: translation_strategy + description: | + Configure how Prometheus metrics are exposed. Values include: + + * UnderscoreEscapingWithSuffixes, the default. This fully escapes metric names for classic Prometheus metric name compatibility, and includes appending type and unit suffixes. + * UnderscoreEscapingWithoutSuffixes, metric names will continue to escape special characters to _, but suffixes won't be attached. + * NoUTF8EscapingWithSuffixes will disable changing special characters to _. Special suffixes like units and _total for counters will be attached. + * NoTranslation. This strategy bypasses all metric and label name translation, passing them through unaltered. + + If omitted or null, UnderscoreEscapingWithSuffixes is used. + isSdkExtensionPlugin: false +- type: ExperimentalResourceDetection + properties: + - property: attributes + description: Configure attributes provided by resource detectors. + - property: detectors + description: | + 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. + isSdkExtensionPlugin: false +- type: ExperimentalResourceDetector + properties: + - property: container + description: | + Enable the container resource detector, which populates container.* attributes. + - property: host + description: | + Enable the host resource detector, which populates host.* and os.* attributes. + - property: process + description: | + Enable the process resource detector, which populates process.* attributes. + - property: service + description: | + Enable the service detector, which populates service.name based on the OTEL_SERVICE_NAME environment variable and service.instance.id. + isSdkExtensionPlugin: true +- type: ExperimentalServiceResourceDetector + properties: [] + isSdkExtensionPlugin: false +- type: ExperimentalTracerConfig + properties: + - property: disabled + description: Configure if the tracer is enabled or not. + isSdkExtensionPlugin: false +- type: ExperimentalTracerConfigurator + properties: + - property: default_config + description: Configure the default tracer config used there is no matching entry in .tracer_configurator/development.tracers. + - property: tracers + description: Configure tracers. + isSdkExtensionPlugin: false +- type: ExperimentalTracerMatcherAndConfig + properties: + - property: name + description: | + Configure tracer names to match, evaluated as follows: + + * If the tracer name exactly matches. + * If the tracer name matches the wildcard pattern, where '?' matches any single character and '*' matches any number of characters including none. + - property: config + description: The tracer config. + isSdkExtensionPlugin: false +- type: ExplicitBucketHistogramAggregation + properties: + - property: boundaries + description: | + Configure bucket boundaries. + If omitted, [0, 5, 10, 25, 50, 75, 100, 250, 500, 750, 1000, 2500, 5000, 7500, 10000] is used. + - property: record_min_max + description: | + Configure record min and max. + If omitted or null, true is used. + isSdkExtensionPlugin: false +- type: ExporterDefaultHistogramAggregation + properties: [] + isSdkExtensionPlugin: false +- type: ExporterTemporalityPreference + properties: [] + isSdkExtensionPlugin: false +- type: IncludeExclude + properties: + - property: included + description: | + 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. + - property: excluded + description: | + 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. + isSdkExtensionPlugin: false +- type: InstrumentType + properties: [] + isSdkExtensionPlugin: false +- type: JaegerPropagator + properties: [] + isSdkExtensionPlugin: false +- type: JaegerRemoteSampler + properties: + - property: endpoint + description: TODO + - property: interval + description: TODO + - property: initial_sampler + description: TODO + isSdkExtensionPlugin: false +- type: LastValueAggregation + properties: [] + isSdkExtensionPlugin: false +- type: LoggerProvider + properties: + - property: processors + description: Configure log record processors. + - property: limits + description: Configure log record limits. See also attribute_limits. + - property: logger_configurator/development + description: | + Configure loggers. + This type is in development and subject to breaking changes in minor versions. + isSdkExtensionPlugin: false +- type: LogRecordExporter + properties: + - property: otlp_http + description: Configure exporter to be OTLP with HTTP transport. + - property: otlp_grpc + description: Configure exporter to be OTLP with gRPC transport. + - property: otlp_file/development + description: | + Configure exporter to be OTLP with file transport. + This type is in development and subject to breaking changes in minor versions. + - property: console + description: Configure exporter to be console. + isSdkExtensionPlugin: true +- type: LogRecordLimits + properties: + - property: attribute_value_length_limit + description: | + Configure max attribute value size. Overrides .attribute_limits.attribute_value_length_limit. + Value must be non-negative. + If omitted or null, there is no limit. + - property: attribute_count_limit + description: | + Configure max attribute count. Overrides .attribute_limits.attribute_count_limit. + Value must be non-negative. + If omitted or null, 128 is used. + isSdkExtensionPlugin: false +- type: LogRecordProcessor + properties: + - property: batch + description: Configure a batch log record processor. + - property: simple + description: Configure a simple log record processor. + isSdkExtensionPlugin: true +- type: MeterProvider + properties: + - property: readers + description: Configure metric readers. + - property: views + description: | + Configure views. + Each view has a selector which determines the instrument(s) it applies to, and a configuration for the resulting stream(s). + - property: exemplar_filter + description: | + 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. + - property: meter_configurator/development + description: | + Configure meters. + This type is in development and subject to breaking changes in minor versions. + isSdkExtensionPlugin: false +- type: MetricProducer + properties: + - property: opencensus + description: Configure metric producer to be opencensus. + isSdkExtensionPlugin: true +- type: MetricReader + properties: + - property: periodic + description: Configure a periodic metric reader. + - property: pull + description: Configure a pull based metric reader. + isSdkExtensionPlugin: false +- type: NameStringValuePair + properties: + - property: name + description: The name of the pair. + - property: value + description: The value of the pair. + isSdkExtensionPlugin: false +- type: OpenCensusMetricProducer + properties: [] + isSdkExtensionPlugin: false +- type: OpentelemetryConfiguration + properties: + - property: file_format + description: | + The file format version. + The yaml format is documented at + https://github.com/open-telemetry/opentelemetry-configuration/tree/main/schema + - property: disabled + description: | + Configure if the SDK is disabled or not. + If omitted or null, false is used. + - property: log_level + description: | + Configure the log level of the internal logger used by the SDK. + If omitted, info is used. + - property: attribute_limits + description: | + Configure general attribute limits. See also tracer_provider.limits, logger_provider.limits. + - property: logger_provider + description: | + Configure logger provider. + If omitted, a noop logger provider is used. + - property: meter_provider + description: | + Configure meter provider. + If omitted, a noop meter provider is used. + - property: propagator + description: | + Configure text map context propagators. + If omitted, a noop propagator is used. + - property: tracer_provider + description: | + Configure tracer provider. + If omitted, a noop tracer provider is used. + - property: resource + description: | + Configure resource for all signals. + If omitted, the default resource is used. + - property: instrumentation/development + description: | + Configure instrumentation. + This type is in development and subject to breaking changes in minor versions. + isSdkExtensionPlugin: false +- type: OpenTracingPropagator + properties: [] + isSdkExtensionPlugin: false +- type: OtlpGrpcExporter + properties: + - property: endpoint + description: | + Configure endpoint. + If omitted or null, http://localhost:4317 is used. + - property: certificate_file + description: | + Configure certificate used to verify a server's TLS credentials. + Absolute path to certificate file in PEM format. + If omitted or null, system default certificate verification is used for secure connections. + - property: client_key_file + description: | + Configure mTLS private client key. + Absolute path to client key file in PEM format. If set, .client_certificate must also be set. + If omitted or null, mTLS is not used. + - property: client_certificate_file + description: | + Configure mTLS client certificate. + Absolute path to client certificate file in PEM format. If set, .client_key must also be set. + If omitted or null, mTLS is not used. + - property: headers + description: | + Configure headers. Entries have higher priority than entries from .headers_list. + If an entry's .value is null, the entry is ignored. + - property: headers_list + description: | + 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. + - property: compression + description: | + Configure compression. + Values include: gzip, none. Implementations may support other compression algorithms. + If omitted or null, none is used. + - property: timeout + description: | + 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. + - property: insecure + description: | + Configure client transport security for the exporter's connection. + Only applicable when .endpoint is provided without http or https scheme. Implementations may choose to ignore .insecure. + If omitted or null, false is used. + isSdkExtensionPlugin: false +- type: OtlpGrpcMetricExporter + properties: + - property: endpoint + description: | + Configure endpoint. + If omitted or null, http://localhost:4317 is used. + - property: certificate_file + description: | + Configure certificate used to verify a server's TLS credentials. + Absolute path to certificate file in PEM format. + If omitted or null, system default certificate verification is used for secure connections. + - property: client_key_file + description: | + Configure mTLS private client key. + Absolute path to client key file in PEM format. If set, .client_certificate must also be set. + If omitted or null, mTLS is not used. + - property: client_certificate_file + description: | + Configure mTLS client certificate. + Absolute path to client certificate file in PEM format. If set, .client_key must also be set. + If omitted or null, mTLS is not used. + - property: headers + description: | + Configure headers. Entries have higher priority than entries from .headers_list. + If an entry's .value is null, the entry is ignored. + - property: headers_list + description: | + 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. + - property: compression + description: | + Configure compression. + Values include: gzip, none. Implementations may support other compression algorithms. + If omitted or null, none is used. + - property: timeout + description: | + 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. + - property: insecure + description: | + Configure client transport security for the exporter's connection. + Only applicable when .endpoint is provided without http or https scheme. Implementations may choose to ignore .insecure. + If omitted or null, false is used. + - property: temporality_preference + description: | + 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. + - property: default_histogram_aggregation + description: | + 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. + isSdkExtensionPlugin: false +- type: OtlpHttpEncoding + properties: [] + isSdkExtensionPlugin: false +- type: OtlpHttpExporter + properties: + - property: endpoint + description: | + 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. + - property: certificate_file + description: | + Configure certificate used to verify a server's TLS credentials. + Absolute path to certificate file in PEM format. + If omitted or null, system default certificate verification is used for secure connections. + - property: client_key_file + description: | + Configure mTLS private client key. + Absolute path to client key file in PEM format. If set, .client_certificate must also be set. + If omitted or null, mTLS is not used. + - property: client_certificate_file + description: | + Configure mTLS client certificate. + Absolute path to client certificate file in PEM format. If set, .client_key must also be set. + If omitted or null, mTLS is not used. + - property: headers + description: | + Configure headers. Entries have higher priority than entries from .headers_list. + If an entry's .value is null, the entry is ignored. + - property: headers_list + description: | + 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. + - property: compression + description: | + Configure compression. + Values include: gzip, none. Implementations may support other compression algorithms. + If omitted or null, none is used. + - property: timeout + description: | + 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. + - property: encoding + description: | + Configure the encoding used for messages. + Values include: protobuf, json. Implementations may not support json. + If omitted or null, protobuf is used. + isSdkExtensionPlugin: false +- type: OtlpHttpMetricExporter + properties: + - property: endpoint + description: | + 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. + - property: endpoint + description: | + Configure endpoint. + If omitted or null, http://localhost:4317 is used. + - property: certificate_file + description: | + Configure certificate used to verify a server's TLS credentials. + Absolute path to certificate file in PEM format. + If omitted or null, system default certificate verification is used for secure connections. + - property: client_key_file + description: | + Configure mTLS private client key. + Absolute path to client key file in PEM format. If set, .client_certificate must also be set. + If omitted or null, mTLS is not used. + - property: client_certificate_file + description: | + Configure mTLS client certificate. + Absolute path to client certificate file in PEM format. If set, .client_key must also be set. + If omitted or null, mTLS is not used. + - property: headers + description: | + Configure headers. Entries have higher priority than entries from .headers_list. + If an entry's .value is null, the entry is ignored. + - property: headers_list + description: | + 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. + - property: compression + description: | + Configure compression. + Values include: gzip, none. Implementations may support other compression algorithms. + If omitted or null, none is used. + - property: timeout + description: | + 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. + - property: encoding + description: | + Configure the encoding used for messages. + Values include: protobuf, json. Implementations may not support json. + If omitted or null, protobuf is used. + - property: temporality_preference + description: | + 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. + - property: default_histogram_aggregation + description: | + 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. + isSdkExtensionPlugin: false +- type: ParentBasedSampler + properties: + - property: root + description: | + Configure root sampler. + If omitted or null, always_on is used. + - property: remote_parent_sampled + description: | + Configure remote_parent_sampled sampler. + If omitted or null, always_on is used. + - property: remote_parent_not_sampled + description: | + Configure remote_parent_not_sampled sampler. + If omitted or null, always_off is used. + - property: local_parent_sampled + description: | + Configure local_parent_sampled sampler. + If omitted or null, always_on is used. + - property: local_parent_not_sampled + description: | + Configure local_parent_not_sampled sampler. + If omitted or null, always_off is used. + isSdkExtensionPlugin: false +- type: PeriodicMetricReader + properties: + - property: interval + description: | + Configure delay interval (in milliseconds) between start of two consecutive exports. + Value must be non-negative. + If omitted or null, 60000 is used. + - property: timeout + description: | + 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. + - property: exporter + description: Configure exporter. + - property: producers + description: Configure metric producers. + - property: cardinality_limits + description: Configure cardinality limits. + isSdkExtensionPlugin: false +- type: Propagator + properties: + - property: composite + description: | + 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. + - property: composite_list + description: | + 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. + isSdkExtensionPlugin: false +- type: PullMetricExporter + properties: + - property: prometheus/development + description: | + Configure exporter to be prometheus. + This type is in development and subject to breaking changes in minor versions. + isSdkExtensionPlugin: true +- type: PullMetricReader + properties: + - property: exporter + description: Configure exporter. + - property: producers + description: Configure metric producers. + - property: cardinality_limits + description: Configure cardinality limits. + isSdkExtensionPlugin: false +- type: PushMetricExporter + properties: + - property: otlp_http + description: | + Configure exporter to be OTLP with HTTP transport. + - property: otlp_grpc + description: | + Configure exporter to be OTLP with gRPC transport. + - property: otlp_file/development + description: | + Configure exporter to be OTLP with file transport. + This type is in development and subject to breaking changes in minor versions. + - property: console + description: | + Configure exporter to be console. + isSdkExtensionPlugin: true +- type: Resource + properties: + - property: attributes + description: | + Configure resource attributes. Entries have higher priority than entries from .resource.attributes_list. + - property: detection/development + description: | + Configure resource detection. + This type is in development and subject to breaking changes in minor versions. + If omitted or null, resource detection is disabled. + - property: schema_url + description: | + Configure resource schema URL. + If omitted or null, no schema URL is used. + - property: attributes_list + description: | + 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. + isSdkExtensionPlugin: false +- type: Sampler + properties: + - property: always_off + description: Configure sampler to be always_off. + - property: always_on + description: Configure sampler to be always_on. + - property: jaeger_remote + description: TODO + - property: parent_based + description: Configure sampler to be parent_based. + - property: trace_id_ratio_based + description: Configure sampler to be trace_id_ratio_based. + isSdkExtensionPlugin: true +- type: SimpleLogRecordProcessor + properties: + - property: exporter + description: Configure exporter. + isSdkExtensionPlugin: false +- type: SimpleSpanProcessor + properties: + - property: exporter + description: Configure exporter. + isSdkExtensionPlugin: false +- type: SpanExporter + properties: + - property: otlp_http + description: Configure exporter to be OTLP with HTTP transport. + - property: otlp_grpc + description: Configure exporter to be OTLP with gRPC transport. + - property: otlp_file/development + description: | + Configure exporter to be OTLP with file transport. + This type is in development and subject to breaking changes in minor versions. + - property: console + description: Configure exporter to be console. + - property: zipkin + description: Configure exporter to be zipkin. + isSdkExtensionPlugin: true +- type: SpanLimits + properties: + - property: attribute_value_length_limit + description: | + Configure max attribute value size. Overrides .attribute_limits.attribute_value_length_limit. + Value must be non-negative. + If omitted or null, there is no limit. + - property: attribute_count_limit + description: | + Configure max attribute count. Overrides .attribute_limits.attribute_count_limit. + Value must be non-negative. + If omitted or null, 128 is used. + - property: event_count_limit + description: | + Configure max span event count. + Value must be non-negative. + If omitted or null, 128 is used. + - property: link_count_limit + description: | + Configure max span link count. + Value must be non-negative. + If omitted or null, 128 is used. + - property: event_attribute_count_limit + description: | + Configure max attributes per span event. + Value must be non-negative. + If omitted or null, 128 is used. + - property: link_attribute_count_limit + description: | + Configure max attributes per span link. + Value must be non-negative. + If omitted or null, 128 is used. + isSdkExtensionPlugin: false +- type: SpanProcessor + properties: + - property: batch + description: Configure a batch span processor. + - property: simple + description: Configure a simple span processor. + isSdkExtensionPlugin: true +- type: SumAggregation + properties: [] + isSdkExtensionPlugin: false +- type: TextMapPropagator + properties: + - property: tracecontext + description: Include the w3c trace context propagator. + - property: baggage + description: Include the w3c baggage propagator. + - property: b3 + description: Include the zipkin b3 propagator. + - property: b3multi + description: Include the zipkin b3 multi propagator. + - property: jaeger + description: Include the jaeger propagator. + - property: ottrace + description: Include the opentracing propagator. + isSdkExtensionPlugin: true +- type: TraceContextPropagator + properties: [] + isSdkExtensionPlugin: false +- type: TraceIdRatioBasedSampler + properties: + - property: ratio + description: | + Configure trace_id_ratio. + If omitted or null, 1.0 is used. + isSdkExtensionPlugin: false +- type: TracerProvider + properties: + - property: processors + description: Configure span processors. + - property: limits + description: Configure span limits. See also attribute_limits. + - property: sampler + description: | + Configure the sampler. + If omitted, parent based sampler with a root of always_on is used. + - property: tracer_configurator/development + description: | + Configure tracers. + This type is in development and subject to breaking changes in minor versions. + isSdkExtensionPlugin: false +- type: View + properties: + - property: selector + description: | + 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. + - property: stream + description: Configure view stream. + isSdkExtensionPlugin: false +- type: ViewSelector + properties: + - property: instrument_name + description: | + Configure instrument name selection criteria. + If omitted or null, all instrument names match. + - property: instrument_type + description: | + Configure instrument type selection criteria. + Values include: counter, gauge, histogram, observable_counter, observable_gauge, observable_up_down_counter, up_down_counter. + If omitted or null, all instrument types match. + - property: unit + description: | + Configure the instrument unit selection criteria. + If omitted or null, all instrument units match. + - property: meter_name + description: | + Configure meter name selection criteria. + If omitted or null, all meter names match. + - property: meter_version + description: | + Configure meter version selection criteria. + If omitted or null, all meter versions match. + - property: meter_schema_url + description: | + Configure meter schema url selection criteria. + If omitted or null, all meter schema URLs match. + isSdkExtensionPlugin: false +- type: ViewStream + properties: + - property: name + description: | + Configure metric name of the resulting stream(s). + If omitted or null, the instrument's original name is used. + - property: description + description: | + Configure metric description of the resulting stream(s). + If omitted or null, the instrument's origin description is used. + - property: aggregation + description: | + 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. + - property: aggregation_cardinality_limit + description: | + Configure the aggregation cardinality limit. + If omitted or null, the metric reader's default cardinality limit is used. + - property: attribute_keys + description: | + Configure attribute keys retained in the resulting stream(s). + isSdkExtensionPlugin: false +- type: ZipkinSpanExporter + properties: + - property: endpoint + description: | + Configure endpoint. + If omitted or null, http://localhost:9411/api/v2/spans is used. + - property: timeout + description: | + Configure max time (in milliseconds) to wait for each export. + Value must be non-negative. A value of 0 indicates indefinite. + If omitted or null, 10000 is used. + isSdkExtensionPlugin: false diff --git a/schema/type_descriptions.yaml b/schema/type_descriptions.yaml deleted file mode 100644 index 42507281..00000000 --- a/schema/type_descriptions.yaml +++ /dev/null @@ -1,955 +0,0 @@ -# This file contains an array of objects defining the descriptions of properties for types defined in the schema. -# See "description generation" in CONTRIBUTING.md for more details. -# -# Example rule: -# - type: MyType # The type name corresponding to the JSON Schema Title. -# property_descriptions: # Mapping of the type's properties and their descriptions. -# propertyA: The propertyA description. # The description for MyType.propertyA. -# propertyB: The propertyB description. # The description for MyType.propertyB -# path_patterns: # Array of patterns where this type occurs in the schema. Each key-value in an example configuration file is transformed -# - .foo # into its JSON dot-notation location in the file, which is matched against these patterns. Each pattern is turned in a regex, - # after escaping special characters and replacing "*" with ".*". - -# START OpenTelemetryConfiguration -- type: OpenTelemetryConfiguration - property_descriptions: - file_format: > - The file format version. - - 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. - - If omitted or null, false is used. - log_level: > - Configure the log level of the internal logger used by the SDK. - - If omitted, info is used. - resource: > - Configure resource for all signals. - - If omitted, the default resource is used. - propagator: > - Configure text map context propagators. - - If omitted, a noop propagator is used. - attribute_limits: Configure general attribute limits. See also tracer_provider.limits, logger_provider.limits. - 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/development: > - Configure instrumentation. - - This type is in development and subject to breaking changes in minor versions. - path_patterns: - - . - -- type: Resource - property_descriptions: - 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. 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. - detection/development: > - Configure resource detection. - - This type is in development and subject to breaking changes in minor versions. - - If omitted or null, resource detection is disabled. - schema_url: > - Configure resource schema URL. - - If omitted or null, no schema URL is used. - path_patterns: - - .resource - -- type: ResourceDetection - property_descriptions: - attributes: Configure attributes provided by resource detectors. - detectors: > - 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. - path_patterns: - - .resource.detection/development - -- type: Detector - property_descriptions: - container: > - Enable the container resource detector, which populates container.* attributes. - host: > - Enable the host resource detector, which populates host.* and os.* attributes. - process: > - Enable the process resource detector, which populates process.* attributes. - service: > - Enable the service detector, which populates service.name based on the OTEL_SERVICE_NAME environment variable and service.instance.id. - path_patterns: - - .resource.detection/development.detectors[] - -- type: DetectorAttributes - property_descriptions: - 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.detection/development.attributes - -- type: AttributeLimits - property_descriptions: - attribute_value_length_limit: > - Configure max attribute value size. - - Value must be non-negative. - - If omitted or null, there is no limit. - attribute_count_limit: > - Configure max attribute count. - - Value must be non-negative. - - If omitted or null, 128 is used. - path_patterns: - - .attribute_limits - -- type: Propagator - property_descriptions: - composite: > - 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: > - 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. - path_patterns: - - .propagator -- type: CompositePropagator - property_descriptions: - tracecontext: Include the w3c trace context propagator. - baggage: Include the w3c baggage propagator. - b3: Include the zipkin b3 propagator. - b3multi: Include the zipkin b3 multi propagator. - jaeger: Include the jaeger propagator. - ottrace: Include the opentracing propagator. - path_patterns: - - .propagator.composite[] -# END OpenTelemetryConfiguration - -# START LoggerProvider -- type: LoggerProvider - property_descriptions: - processors: Configure log record processors. - limits: Configure log record limits. See also attribute_limits. - logger_configurator/development: > - Configure loggers. - - This type is in development and subject to breaking changes in minor versions. - path_patterns: - - .logger_provider - -- type: LogRecordProcessor - property_descriptions: - batch: Configure a batch log record processor. - simple: Configure a simple log record processor. - path_patterns: - - .logger_provider.processors[] - -- type: BatchLogRecordProcessor - property_descriptions: - schedule_delay: > - Configure delay interval (in milliseconds) between two consecutive exports. - - Value must be non-negative. - - If omitted or null, 1000 is used. - export_timeout: > - 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. - max_queue_size: > - Configure maximum queue size. Value must be positive. - - If omitted or null, 2048 is used. - max_export_batch_size: > - Configure maximum batch size. Value must be positive. - - If omitted or null, 512 is used. - exporter: Configure exporter. - path_patterns: - - .logger_provider.processors[].batch - -- type: SimpleLogRecordProcessor - property_descriptions: - exporter: Configure exporter. - path_patterns: - - .logger_provider.processors[].simple - -- type: LogRecordExporter - property_descriptions: - otlp_http: Configure exporter to be OTLP with HTTP transport. - otlp_grpc: Configure exporter to be OTLP with gRPC transport. - otlp_file/development: > - Configure exporter to be OTLP with file transport. - - This type is in development and subject to breaking changes in minor versions. - console: Configure exporter to be console. - path_patterns: - - .logger_provider.processors[].*.exporter - -- type: LogRecordLimits - property_descriptions: - attribute_value_length_limit: > - Configure max attribute value size. Overrides .attribute_limits.attribute_value_length_limit. - - Value must be non-negative. - - If omitted or null, there is no limit. - attribute_count_limit: > - Configure max attribute count. Overrides .attribute_limits.attribute_count_limit. - - Value must be non-negative. - - If omitted or null, 128 is used. - path_patterns: - - .logger_provider.limits - -- type: LoggerConfigurator - property_descriptions: - default_config: Configure the default logger config used there is no matching entry in .logger_configurator/development.loggers. - loggers: Configure loggers. - path_patterns: - - .logger_provider.logger_configurator/development - -- type: LoggerConfigAndMatcher - property_descriptions: - name: > - Configure logger names to match, evaluated as follows: - - * If the logger name exactly matches. - * If the logger name matches the wildcard pattern, where '?' matches any single character and '*' matches any number of characters including none. - config: The logger config. - path_patterns: - - .logger_provider.logger_configurator/development.loggers[] - -- type: LoggerConfig - property_descriptions: - disabled: Configure if the logger is enabled or not. - path_patterns: - - .logger_provider.logger_configurator/development.default_config - - .logger_provider.logger_configurator/development.loggers[].config -# END LoggerProvider - -# START TracerProvider -- type: TracerProvider - property_descriptions: - processors: Configure span processors. - limits: Configure span limits. See also attribute_limits. - sampler: > - Configure the sampler. - - If omitted, parent based sampler with a root of always_on is used. - tracer_configurator/development: > - Configure tracers. - - This type is in development and subject to breaking changes in minor versions. - path_patterns: - - .tracer_provider - -- type: SpanProcessor - property_descriptions: - batch: Configure a batch span processor. - simple: Configure a simple span processor. - path_patterns: - - .tracer_provider.processors[] - -- type: BatchSpanProcessor - property_descriptions: - schedule_delay: > - Configure delay interval (in milliseconds) between two consecutive exports. - - Value must be non-negative. - - If omitted or null, 5000 is used. - export_timeout: > - 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. - max_queue_size: > - Configure maximum queue size. Value must be positive. - - If omitted or null, 2048 is used. - max_export_batch_size: > - Configure maximum batch size. Value must be positive. - - If omitted or null, 512 is used. - exporter: Configure exporter. - path_patterns: - - .tracer_provider.processors[].batch - -- type: SimpleSpanProcessor - property_descriptions: - exporter: Configure exporter. - path_patterns: - - .tracer_provider.processors[].simple - -- type: SpanExporter - property_descriptions: - otlp_http: Configure exporter to be OTLP with HTTP transport. - otlp_grpc: Configure exporter to be OTLP with gRPC transport. - otlp_file/development: > - Configure exporter to be OTLP with file transport. - - This type is in development and subject to breaking changes in minor versions. - zipkin: Configure exporter to be zipkin. - console: Configure exporter to be console. - path_patterns: - - .tracer_provider.processors[].*.exporter - -- type: ZipkinSpanExporter - property_descriptions: - 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. - - Value must be non-negative. A value of 0 indicates indefinite. - - 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. - - Value must be non-negative. - - If omitted or null, there is no limit. - attribute_count_limit: > - Configure max attribute count. Overrides .attribute_limits.attribute_count_limit. - - Value must be non-negative. - - If omitted or null, 128 is used. - event_count_limit: > - Configure max span event count. - - Value must be non-negative. - - If omitted or null, 128 is used. - link_count_limit: > - Configure max span link count. - - Value must be non-negative. - - If omitted or null, 128 is used. - event_attribute_count_limit: > - Configure max attributes per span event. - - Value must be non-negative. - - If omitted or null, 128 is used. - link_attribute_count_limit: > - Configure max attributes per span link. - - Value must be non-negative. - - If omitted or null, 128 is used. - path_patterns: - - .tracer_provider.limits - -- type: Sampler - property_descriptions: - parent_based: Configure sampler to be parent_based. - 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. - - 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.* - -- type: TracerConfigurator - property_descriptions: - default_config: Configure the default tracer config used there is no matching entry in .tracer_configurator/development.tracers. - tracers: Configure tracers. - path_patterns: - - .tracer_provider.tracer_configurator/development - -- type: TracerConfigAndMatcher - property_descriptions: - name: > - Configure tracer names to match, evaluated as follows: - - * If the tracer name exactly matches. - * If the tracer name matches the wildcard pattern, where '?' matches any single character and '*' matches any number of characters including none. - config: The tracer config. - path_patterns: - - .tracer_provider.tracer_configurator/development.tracers[] - -- type: TracerConfig - property_descriptions: - disabled: Configure if the tracer is enabled or not. - path_patterns: - - .tracer_provider.tracer_configurator/development.default_config - - .tracer_provider.tracer_configurator/development.tracers[].config -# END TracerProvider - -# START MeterProvider -- type: MeterProvider - 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. - - 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: > - Configure meters. - - This type is in development and subject to breaking changes in minor versions. - path_patterns: - - .meter_provider - -- type: MetricReader - property_descriptions: - pull: Configure a pull based metric reader. - periodic: Configure a periodic metric reader. - path_patterns: - - .meter_provider.readers[] - -- type: PullMetricReader - property_descriptions: - exporter: Configure exporter. - producers: Configure metric producers. - cardinality_limits: Configure cardinality limits. - path_patterns: - - .meter_provider.readers[].pull - -- type: PeriodicMetricReader - property_descriptions: - interval: > - Configure delay interval (in milliseconds) between start of two consecutive exports. - - Value must be non-negative. - - If omitted or null, 60000 is used. - timeout: > - 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. - exporter: Configure exporter. - producers: Configure metric producers. - cardinality_limits: Configure cardinality limits. - path_patterns: - - .meter_provider.readers[].periodic - -- type: MetricProducer - property_descriptions: - opencensus: Configure metric producer to be opencensus. - prometheus: Configure metric producer to be prometheus. - path_patterns: - - .meter_provider.readers[].pull.producers[] - - .meter_provider.readers[].periodic.producers[] - -- type: CardinalityLimits - property_descriptions: - default: > - Configure default cardinality limit for all instrument types. - - Instrument-specific cardinality limits take priority. - - If omitted or null, 2000 is used. - counter: > - Configure default cardinality limit for counter instruments. - - If omitted or null, the value from .default is used. - gauge: > - Configure default cardinality limit for gauge instruments. - - If omitted or null, the value from .default is used. - histogram: > - Configure default cardinality limit for histogram instruments. - - If omitted or null, the value from .default is used. - observable_counter: > - Configure default cardinality limit for observable_counter instruments. - - If omitted or null, the value from .default is used. - observable_gauge: > - Configure default cardinality limit for observable_gauge instruments. - - If omitted or null, the value from .default is used. - observable_up_down_counter: > - Configure default cardinality limit for observable_up_down_counter instruments. - - If omitted or null, the value from .default is used. - up_down_counter: > - Configure default cardinality limit for up_down_counter instruments. - - If omitted or null, the value from .default is used. - path_patterns: - - .meter_provider.readers[].pull.cardinality_limits - - .meter_provider.readers[].periodic.cardinality_limits - -- type: MetricExporter - property_descriptions: - prometheus/development: > - Configure exporter to be prometheus. - - This type is in development and subject to breaking changes in minor versions. - otlp_http: Configure exporter to be OTLP with HTTP transport. - otlp_grpc: Configure exporter to be OTLP with gRPC transport. - otlp_file/development: > - Configure exporter to be OTLP with file transport. - - This type is in development and subject to breaking changes in minor versions. - console: Configure exporter to be console. - path_patterns: - - .meter_provider.readers[].*.exporter - -- type: PrometheusMetricExporter - property_descriptions: - host: > - Configure host. - - If omitted or null, localhost is used. - port: > - Configure port. - - If omitted or null, 9464 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. - translation_strategy: > - Configure how Prometheus metrics are exposed. Values include: - - * UnderscoreEscapingWithSuffixes, the default. This fully escapes metric names for classic Prometheus metric name compatibility, and includes appending type and unit suffixes. - * UnderscoreEscapingWithoutSuffixes, metric names will continue to escape special characters to _, but suffixes won't be attached. - * NoUTF8EscapingWithSuffixes will disable changing special characters to _. Special suffixes like units and _total for counters will be attached. - * NoTranslation. This strategy bypasses all metric and label name translation, passing them through unaltered. - - If omitted or null, UnderscoreEscapingWithSuffixes is used. - path_patterns: - - .meter_provider.readers[].pull.exporter.prometheus/development -- type: PrometheusIncludeExclude - property_descriptions: - 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/development.with_resource_constant_labels - -- type: View - property_descriptions: - 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. - - If omitted or null, all instrument names match. - instrument_type: > - Configure instrument type selection criteria. - - Values include: counter, gauge, histogram, observable_counter, observable_gauge, observable_up_down_counter, up_down_counter. - - 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). - - 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). - - 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_cardinality_limit: > - Configure the aggregation cardinality limit. - - If omitted or null, the metric reader's default cardinality limit 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 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 - -- type: StreamAggregation - property_descriptions: - explicit_bucket_histogram: Configure aggregation to be explicit_bucket_histogram. - path_patterns: - - .meter_provider.views[].stream.aggregation - -- type: StreamAggregationExplicitBucketHistogram - property_descriptions: - 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 - -- type: MeterConfigurator - property_descriptions: - default_config: Configure the default meter config used there is no matching entry in .meter_configurator/development.meters. - meters: Configure meters. - path_patterns: - - .meter_provider.meter_configurator/development - -- type: MeterConfigAndMatcher - property_descriptions: - name: > - Configure meter names to match, evaluated as follows: - - * If the meter name exactly matches. - * If the meter name matches the wildcard pattern, where '?' matches any single character and '*' matches any number of characters including none. - config: The meter config. - path_patterns: - - .meter_provider.meter_configurator/development.meters[] - -- type: MeterConfig - property_descriptions: - disabled: Configure if the meter is enabled or not. - path_patterns: - - .meter_provider.meter_configurator/development.default_config - - .meter_provider.meter_configurator/development.meters[].config -# END meter_provider - -# START common -- type: OtlpExporterCommon - property_descriptions: - certificate_file: > - Configure certificate used to verify a server's TLS credentials. - - Absolute path to certificate file in PEM format. - - If omitted or null, system default certificate verification is used for secure connections. - client_key_file: > - Configure mTLS private client key. - - Absolute path to client key file in PEM format. If set, .client_certificate must also be set. - - If omitted or null, mTLS is not used. - client_certificate_file: > - Configure mTLS client certificate. - - Absolute path to client certificate file in PEM format. 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. - - 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. - - Value must be non-negative. A value of 0 indicates no limit (infinity). - - If omitted or null, 10000 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_http - - .logger_provider.processors[].*.exporter.otlp_http - - .meter_provider.readers[].periodic.exporter.otlp_http - - .tracer_provider.processors[].*.exporter.otlp_grpc - - .logger_provider.processors[].*.exporter.otlp_grpc - - .meter_provider.readers[].periodic.exporter.otlp_grpc -- type: OtlpHttpExporter - property_descriptions: - encoding: > - Configure the encoding used for messages. - - Values include: protobuf, json. Implementations may not support json. - - If omitted or null, protobuf is used. - path_patterns: - - .tracer_provider.processors[].*.exporter.otlp_http - - .logger_provider.processors[].*.exporter.otlp_http - - .meter_provider.readers[].periodic.exporter.otlp_http -- type: OtlpHttpSpanExporter - property_descriptions: - endpoint: > - Configure endpoint, including the trace specific path. - - If omitted or null, http://localhost:4318/v1/traces is used. - path_patterns: - - .tracer_provider.processors[].*.exporter.otlp_http -- type: OtlpHttpMetricExporter - property_descriptions: - endpoint: > - Configure endpoint, including the metric specific path. - - If omitted or null, http://localhost:4318/v1/metrics is used. - path_patterns: - - .meter_provider.readers[].periodic.exporter.otlp_http -- type: OtlpHttpLogRecordExporter - property_descriptions: - endpoint: > - Configure endpoint, including the log specific path. - - If omitted or null, http://localhost:4318/v1/logs is used. - path_patterns: - - .meter_provider.readers[].periodic.exporter.otlp_http -- type: OtlpGrpcExporter - property_descriptions: - endpoint: > - Configure endpoint. - - If omitted or null, http://localhost:4317 is used. - insecure: > - Configure client transport security for the exporter's connection. - - Only applicable when .endpoint is provided without http or https scheme. Implementations may choose to ignore .insecure. - - If omitted or null, false is used. - path_patterns: - - .tracer_provider.processors[].*.exporter.otlp_grpc - - .logger_provider.processors[].*.exporter.otlp_grpc - - .meter_provider.readers[].periodic.exporter.otlp_grpc -- type: OtlpFileExporter - property_descriptions: - output_stream: > - Configure output stream. - - Values include stdout, or scheme+destination. For example: file:///path/to/file.jsonl. - - If omitted or null, stdout is used. - path_patterns: - - .tracer_provider.processors[].*.exporter.otlp_file/development - - .logger_provider.processors[].*.exporter.otlp_file/development - - .meter_provider.readers[].periodic.exporter.otlp_file/development -# END common - -# START Instrumentation -- type: Instrumentation - property_descriptions: - general: > - Configure general SemConv options that may apply to multiple languages and instrumentations. - - Instrumenation may merge general config options with the language specific configuration at .instrumentation.. - cpp: Configure C++ language-specific instrumentation libraries. - dotnet: Configure .NET language-specific instrumentation libraries. - erlang: Configure Erlang language-specific instrumentation libraries. - go: Configure Go language-specific instrumentation libraries. - java: Configure Java language-specific instrumentation libraries. - js: Configure JavaScript language-specific instrumentation libraries. - php: Configure PHP language-specific instrumentation libraries. - python: Configure Python language-specific instrumentation libraries. - ruby: Configure Ruby language-specific instrumentation libraries. - rust: Configure Rust language-specific instrumentation libraries. - swift: Configure Swift language-specific instrumentation libraries. - path_patterns: - - .instrumentation/development - -- type: GeneralInstrumentation - property_descriptions: - peer: > - Configure instrumentations following the peer semantic conventions. - - See peer semantic conventions: https://opentelemetry.io/docs/specs/semconv/attributes-registry/peer/ - http: > - Configure instrumentations following the http semantic conventions. - - See http semantic conventions: https://opentelemetry.io/docs/specs/semconv/http/ - path_patterns: - - .instrumentation/development.general - -- type: GeneralInstrumentationPeer - property_descriptions: - service_mapping: > - Configure the service mapping for instrumentations following peer.service semantic conventions. - - Each entry is a key value pair where "peer" defines the IP address and "service" defines the corresponding logical name of the service. - - See peer.service semantic conventions: https://opentelemetry.io/docs/specs/semconv/general/attributes/#general-remote-service-attributes - path_patterns: - - .instrumentation/development.general.peer - -- type: GeneralInstrumentationHttp - property_descriptions: - client: Configure instrumentations following the http client semantic conventions. - server: Configure instrumentations following the http server semantic conventions. - path_patterns: - - .instrumentation/development.general.http - -- type: GeneralInstrumentationHttpClient - property_descriptions: - request_captured_headers: Configure headers to capture for outbound http requests. - response_captured_headers: Configure headers to capture for outbound http responses. - path_patterns: - - .instrumentation/development.general.http.client - -- type: GeneralInstrumentationHttpServer - property_descriptions: - request_captured_headers: Configure headers to capture for inbound http requests. - response_captured_headers: Configure headers to capture for outbound http responses. - path_patterns: - - .instrumentation/development.general.http.server - -- type: LanguageSpecificInstrumentation - property_descriptions: - example: Configure the instrumentation corresponding to key "example". - path_patterns: - - .instrumentation/development.* -# END Instrumentation - diff --git a/scripts/fix-meta-schema.js b/scripts/fix-meta-schema.js new file mode 100644 index 00000000..e60be599 --- /dev/null +++ b/scripts/fix-meta-schema.js @@ -0,0 +1,16 @@ + +import { + readAndFixMetaSchemaTypes, writeMetaSchemaTypes +} from "./meta-schema.js"; + +const { messages, types } = readAndFixMetaSchemaTypes(); + +// Sort lexigraphically and write to meta schema +let sortedMetaSchemaTypes = types.map(type => type.toJson()); +sortedMetaSchemaTypes.sort((a, b) => a.type.localeCompare(b.type)); +writeMetaSchemaTypes(sortedMetaSchemaTypes); + +// Write messages to console +messages.forEach(message => { + console.log(message); +}); diff --git a/scripts/generate-descriptions.js b/scripts/generate-descriptions.js index 2564f9fc..1170a8f1 100644 --- a/scripts/generate-descriptions.js +++ b/scripts/generate-descriptions.js @@ -1,10 +1,12 @@ -const fs = require('node:fs'); -const yaml = require('yaml'); +import fs from 'fs'; +import yaml from 'yaml'; +import {readAndFixMetaSchemaTypes} from "./meta-schema.js"; +import {readJsonSchemaTypes} from "./json-schema.js"; // Extract input file arg or throw -const usageString = "Usage: \n npm run-script generate-comments -- /absolute/path/to/input/file.yaml /absolute/path/to/output/file.yaml"; +const usageString = "Usage: \n npm run-script generate-descriptions -- /absolute/path/to/input/file.yaml /absolute/path/to/output/file.yaml [--debug]"; if (process.argv.length < 3) { - throw new Error("Missing file to generate comments for. " + usageString); + throw new Error("Missing file to generate descriptions for. " + usageString); } const inputFile = process.argv[2]; if (!fs.existsSync(inputFile)) { @@ -27,39 +29,23 @@ for (let i = 3; i < process.argv.length; i++) { } } -// Read and validate description rules -const typeDescriptionsContent = fs.readFileSync(__dirname + "/../schema/type_descriptions.yaml", "utf-8"); -const typeDescriptionsYaml = yaml.parse(typeDescriptionsContent); -const rulesByType = {}; -typeDescriptionsYaml.forEach(rule => { - const type = rule.type; - if (!(typeof type === 'string') && !(type instanceof String)) { - throw new Error("rule must have type: " + JSON.stringify(rule)); - } - if (type in rulesByType) { - throw new Error("multiple rules with type: " + type); - } - rulesByType[type] = rule; - if (!('property_descriptions' in rule)) { - throw new Error("rule missing property_description:" + JSON.stringify(rule)); - } - if (!('path_patterns' in rule)) { - throw new Error("rule missing path_patterns:" + JSON.stringify(rule)); - } - debug("\nRule for type: " + type); - debug(" property_descriptions:") - Object.entries(rule.property_descriptions) - .forEach(([property, description]) => debug(" " + property + ": " + description)); - debug(" path_patterns: \n" + rule.path_patterns.map(entry => " - " + toRegex(entry)).join("\n")); -}) +// Read JSON schema and meta schema +const { messages, types } = readAndFixMetaSchemaTypes(); +const metaSchemaTypesByType = {}; +types.forEach(type => metaSchemaTypesByType[type.type] = type); +if (messages.length > 0) { + throw new Error("Meta schema has problems. Please run fix-meta-schema and try again."); +} +const jsonSchemaTypesByType = {}; +readJsonSchemaTypes().forEach(type => jsonSchemaTypesByType[type.type] = type); -// Read in the input file +// Read and process the input file +// Visit each key/value pair in the input file YAML, attempting to match against description rules +// and setting a comment with the description from the matching rule const fileContent = fs.readFileSync(inputFile, "utf-8"); const fileDoc = yaml.parseDocument(fileContent); let counter = 0; let lastNode = null; -// Visit each key/value pair in the input file YAML, attempting to match against description rules -// and setting a comment with the description from the matching rule yaml.visit(fileDoc, { Pair: (key, node, path) => { if (yaml.isSeq(node.value)) { @@ -68,39 +54,36 @@ yaml.visit(fileDoc, { let prevLastNode = lastNode; lastNode = node; counter++; - // Compute the parenPath, a string representation of the location of this key/value pair in the document - // For example, the following sample YAML is annotated with the parentPath at each node - // parent: # . - // child: value # .parent - // child_arr: # .parent - // - arr_key: value # .parent.child_arr[] - const parentPath = pathToString(path); const propertyKey = node.key.value; + const jsonPath = yamlPathToJsonPath(path, propertyKey); + + // Resolve jsonSchemaType, metaSchemaType, metaSchemaProperty, or return debug(""); - debug("parentPath: " + parentPath ); - debug("propertyKey: " + propertyKey); - debug("currentNodePath: " + parentPath + (parentPath === "." ? "" : ".") + propertyKey); - // Iterate through the rules and find the first with a matching entry in rule.path_patterns and with defined property key - const matchingRule = typeDescriptionsYaml.find((rule) => { - const matchingPathPattern = rule['path_patterns'].find((pathPattern) => { - const regex = new RegExp(toRegex(pathPattern)); - return regex.test(parentPath); - }); - if (matchingPathPattern === undefined) { - return false; - } - return rule['property_descriptions'][propertyKey] !== undefined; - }); - // Exit early if no matching rule - if (matchingRule === undefined) { - debug("no matching rule") + debug(`Resolving description for ${jsonPath}`); + let jsonSchemaType; + try { + jsonSchemaType = resolveJsonSchemaType(jsonSchemaTypesByType, path); + } catch (error) { + debug(`Unable to resolve JSON schema type: ${error.message}`); return; } - debug("matched rule: " + matchingRule.type); - // We already guarantee that the propertyKey is defined for the rule above - const description = matchingRule['property_descriptions'][propertyKey]; - // Format the description - let formattedDescription = description.replace(/\n$/, '').split('\n').map(line => ' ' + line).join('\n'); + const metaSchemaType = metaSchemaTypesByType[jsonSchemaType.type]; + if (!metaSchemaType) { + throw new Error(`JSON schema type not found for meta schema type ${jsonSchemaType.type}.`); + } + const metaSchemaProperty = metaSchemaType.properties.find(item => item.property === propertyKey); + if (!metaSchemaProperty) { + debug(`No meta schema property ${propertyKey} for type ${metaSchemaType.type}.`); + return; + } + debug(`Resolved type ${jsonSchemaType.type}, property ${metaSchemaProperty.property}, description:\n${metaSchemaProperty.description}`); + + // Set the description + let formattedDescription = metaSchemaProperty.description + .replace(/\n$/, '') + .split('\n') + .map(line => ' ' + line) + .join('\n'); // If we're on the first element, prefix the formatted description with the existing commentBefore to retain the comments at the top of the file if (counter === 1 && node.key.commentBefore) { const index = node.key.commentBefore.lastIndexOf(formattedDescription); @@ -108,9 +91,6 @@ yaml.visit(fileDoc, { ? node.key.commentBefore + formattedDescription : node.key.commentBefore.substring(0, index) + formattedDescription; } - debug("description previously set to:\n" + node.key.commentBefore); - debug("updating description to:\n" + formattedDescription) - // Set the description node.key.commentBefore = formattedDescription; node.value.commentBefore = null; // yaml parser sometimes misidentifies a pair's commentBefore as the previously processed pair.value.comment @@ -128,25 +108,11 @@ if (outputFile === null) { console.log("No output file arg set, logging to console."); console.log(String(fileDoc)) } else { - console.log("Writing output to \"" + outputFile + "\""); + console.log(`Writing output to ${outputFile}`); fs.writeFileSync(outputFile, String(fileDoc)) } // Helper functions - -// Converts an input pattern to a regular expression. -// Converts any "*" to a ".*". -// Escapes all other regex special characters. -// Prefixes with "^", and adds "$" suffix. -function toRegex(pattern) { - let parts = pattern.split("*"); - if (parts.length === 0) parts = [pattern]; - const escaped = parts - .map(chunk => chunk.replace(/[-[\]{}()*+?.,\\^$|]/g, "\\$&")) - .join("(.*)"); - return "^" + escaped + "$"; -} - // Log the message to the console if the script was run with `--debug` argument function debug(message) { if (options.debug) { @@ -154,10 +120,9 @@ function debug(message) { } } -// Convert an array of path elements JSON dot notation -function pathToString(path) { +function yamlPathToJsonPath(yamlPath, propertyKey) { const elements = [] - path.slice().forEach(entry => { + yamlPath.slice().forEach(entry => { if (yaml.isSeq(entry)) { elements.push("[]"); } @@ -166,5 +131,34 @@ function pathToString(path) { elements.push(entry.key.value); } }); - return elements.length === 0 ? "." : elements.join(""); + let jsonPath = elements.join(''); + if (!jsonPath.endsWith('.')) { + jsonPath += '.'; + } + jsonPath += propertyKey; + return jsonPath; +} + +function resolveJsonSchemaType(jsonSchemaTypesByType, yamlPath) { + let last = jsonSchemaTypesByType['OpentelemetryConfiguration']; // TODO: make constant + if (!last) { + throw new Error(`JSON schema missing root type 'OpenTelemetryConfiguration'`); + } + for (let i = 0; i < yamlPath.length; i++) { + const entry = yamlPath[i]; + if (yaml.isPair(entry)) { + const jsonSchemaProperty = last.properties.find(property => property.property === entry.key.value); + if (!jsonSchemaProperty) { + throw new Error(`Unknown property ${entry.key.value} in type ${last.type}.`); + } + // A property may have multiple types. Naively, resolve the type to be the first one that exists in jsonSchemaTypesByType. + const resolvedTypes = jsonSchemaProperty.types.map(type => jsonSchemaTypesByType[type]).filter(Boolean); + if (resolvedTypes.length > 0) { + last = resolvedTypes[0]; + } else { + throw new Error(`Unable to resolve JSON schema type for property ${entry.key.value} in type ${last.type}.`); + } + } + } + return last; } diff --git a/scripts/generate-markdown.js b/scripts/generate-markdown.js new file mode 100644 index 00000000..aae1d420 --- /dev/null +++ b/scripts/generate-markdown.js @@ -0,0 +1,187 @@ +import {readJsonSchemaTypes} from "./json-schema.js"; +import {readAndFixMetaSchemaTypes} from "./meta-schema.js"; +import fs from "node:fs"; +import {markdownDocPath} from "./util.js"; + +const { messages, types } = readAndFixMetaSchemaTypes(); + +if (messages.length > 0) { + throw new Error("Meta schema has problems. Please run fix-meta-schema and try again."); +} + +const jsonSchemaTypes = readJsonSchemaTypes(); +const jsonSchemaTypesByType = {}; +jsonSchemaTypes.forEach(type => jsonSchemaTypesByType[type.type] = type); + +const output = []; +const headers = []; + +types.sort((a, b) => a.type.localeCompare(b.type)); + +addHeader('Overview', 'overview', 1); +output.push('TODO\n'); + +// Write types +addHeader('Types', 'types', 1); +types.forEach(metaSchemaType => { + const type = metaSchemaType.type; + const jsonSchemaType = jsonSchemaTypesByType[type]; + if (!jsonSchemaType) { + throw new Error(`JSON schema type not found for meta schema type ${type}.`); + } + const required = jsonSchemaType.schema['required']; + + // Heading + addHeader(type, type.toLowerCase(), 2); + + // SDK extension plugin + if (metaSchemaType.isSdkExtensionPlugin) { + output.push(`\`${type}\` is an [SDK extension plugin](#sdk-extension-plugins).\n\n`); + } + + // Properties + if (metaSchemaType.properties.length === 0) { + output.push("No properties.\n\n"); + } else { + // Property type and description table + output.push(`| Property | Type | Required? | Constraints | Description |\n`); + output.push("|---|---|---|---|---|\n"); + metaSchemaType.properties.forEach(property => { + const jsonSchemaProperty = jsonSchemaType.properties.find(item => item.property === property.property); + if (!jsonSchemaProperty) { + throw new Error(`JSON schema property not found for property ${property.property} and type ${type}.`); + } + const formattedPropertyType = formatJsonSchemaPropertyType(jsonSchemaProperty, jsonSchemaTypesByType); + const isRequired = required !== undefined && required.includes(property.property); + let formattedConstraints = resolveAndFormatConstraints(jsonSchemaProperty.schema, '
'); + if (formattedConstraints.length === 0) { + formattedConstraints = 'No constraints.'; + } + const formattedDescription = property.description.split("\n").join("
"); + + output.push(`| \`${property.property}\` | ${formattedPropertyType} | \`${isRequired}\` | ${formattedConstraints} | ${formattedDescription} |\n`); + }); + output.push('\n'); + // TODO: print language implementation status + } + + // Constraints + const formattedConstraints = resolveAndFormatConstraints(jsonSchemaType.schema, '\n'); + if (formattedConstraints.length > 0) { + output.push('Constraints: \n\n'); + output.push(formattedConstraints); + output.push('\n'); + } else { + output.push('No constraints.\n\n'); + } + + // Usages + const usages = []; + jsonSchemaTypes.forEach(otherJsonSchemaType => { + otherJsonSchemaType.properties.forEach(property => { + if (property.types.find(item => item === type)) { + usages.push([ otherJsonSchemaType, property ]); + } + }); + }); + if (usages.length > 0) { + output.push('Usages:\n\n'); + usages.forEach(usage => output.push(`* [\`${usage[0].type}.${usage[1].property}\`](#${usage[0].type.toLowerCase()})\n`)); + output.push('\n'); + } else { + output.push('No usages.\n\n'); + } + + // JSON schema collapsible section + output.push(`
\n`); + output.push(`JSON Schema\n\n`); + output.push(`[JSON Schema Source File](./schema/${jsonSchemaType.file})\n`) + output.push(`
${JSON.stringify(jsonSchemaType.schema, null, 2)}
\n`); + output.push(`
\n`); + output.push('\n'); +}); + +// Write SDK extension plugins +addHeader('SDK Extension Plugins', 'sdk-extension-plugins', 1); +output.push( +`[SDK extension plugins](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/configuration/sdk.md#supported-sdk-extension-plugins) are places where custom interface implementations can be referenced and configured. + +For example, you could write a custom \`SpanExporter\`, and indicate that it should be paired with a \`BatchSpanProcessor\`. + +Each of the following types support referencing custom interface implementations. Each type is an object type containing exactly one property whose value is type \`object\` or \`null\`. The property key refers to the name of the custom implementation, and must be the same as the \`name\` of a corresponding registered [ComponentProvider](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/configuration/sdk.md#register-componentprovider). The value passed as configuration when the [ComponentProvider.create](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/configuration/sdk.md#create) is called. + +SDK extension plugin types may have properties defined corresponding to built-in implementations of the interface. For example, the \`otlp_http\` property of \`SpanExporter\` defines the OTLP http/protobuf exporter. + +`); +types.filter(metaSchemaType => metaSchemaType.isSdkExtensionPlugin) + .forEach(metaSchemaType => { + output.push(`* [${metaSchemaType.type}](#${metaSchemaType.type})\n`) + }); + +headers.push('\n\n'); +output.unshift(...headers); +output.unshift('\n\n') +fs.writeFileSync(markdownDocPath, output.join("")); + +// Helper functions +function formatJsonSchemaPropertyType(jsonSchemaProperty, jsonSchemaTypesByType) { + const output = []; + if (jsonSchemaProperty.isSeq) { + output.push('`array` of '); + } + let prefix = ''; + let suffix = ''; + if (jsonSchemaProperty.types.length > 1) { + output.push('one of:
'); + prefix = '* '; + suffix = '
'; + } + jsonSchemaProperty.types.forEach(type => { + let resolvedType = jsonSchemaTypesByType[type]; + output.push(prefix); + output.push(resolvedType ? `[\`${resolvedType.type}\`](#${resolvedType.type.toLowerCase()})` : `\`${type}\``) + output.push(suffix); + }); + return output.join(''); +} + +function addHeader(title, id, level) { + headers.push(`${' '.repeat(level - 1)}* [${title}](#${id})\n`); + output.push(`${'#'.repeat(level)} ${title} \n\n`); +} + +function resolveAndFormatConstraints(schema, linebreak) { + const constraints = []; + const constraintPropertyNames = [ + 'minLength', + 'maxLength', + 'pattern', + 'format', + 'multipleOf', + 'minimum', + 'exclusiveMinimum', + 'maximum', + 'exclusiveMaximum', + 'patternProperties', + 'additionalProperties', + 'propertyNames', + 'minProperties', + 'maxProperties', + 'required', + 'contains', + 'minContains', + 'maxContains', + 'uniqueItems', + 'enum', + 'const', + ]; + + constraintPropertyNames.forEach(propertyName => { + const property = schema[propertyName]; + if (property !== undefined && property !== null) { + constraints.push(`* \`${propertyName}\`: \`${JSON.stringify(property)}\`${linebreak}`); + } + }); + + return constraints.join(''); +} diff --git a/scripts/json-schema.js b/scripts/json-schema.js new file mode 100644 index 00000000..9e924eb2 --- /dev/null +++ b/scripts/json-schema.js @@ -0,0 +1,171 @@ +import fs from 'fs'; +import {MetaSchemaProperty, MetaSchemaType} from "./meta-schema.js"; +import {schemaDirPath} from "./util.js"; + +const localDefPrefix = '#/$defs/'; + +export function readJsonSchemaTypes() { + const typesByType = {}; + const topLevelSchemas = {}; + + fs.readdirSync(schemaDirPath) + .filter(file => file.endsWith(".json")) + .forEach(file => { + const fileContent = JSON.parse(fs.readFileSync(schemaDirPath + file, "utf-8")); + + topLevelSchemas[file] = fileContent; + + if (file === 'opentelemetry_configuration.json') { + typesByType['OpenTelemetryConfiguration'] = new JsonSchemaType('OpentelemetryConfiguration', file, fileContent, '.', fileContent); + } + + Object.entries(getDefs(fileContent)).forEach(([type, schema]) => { + const jsonSchemaPath = `${localDefPrefix}${type}`; + if (type in typesByType) { + throw new Error(`${type} already exists in schemasByName with definition: ` + typesByType[type]); + } + typesByType[type] = new JsonSchemaType(type, file, fileContent, jsonSchemaPath, schema); + }); + }); + + // Resolve refs to top-level types + Object.values(typesByType).forEach(jsonSchemaType => { + const ref = jsonSchemaType.schema['$ref']; + if (!ref) { + return; + } + const topLevelSchema = topLevelSchemas[ref]; + if (!topLevelSchema) { + throw new Error("Could not resolve top level $ref:" + ref); + } + jsonSchemaType.file = ref; + jsonSchemaType.jsonSchemaPath = '.'; + jsonSchemaType.schema = topLevelSchema; + }); + + // Resolve properties + Object.values(typesByType).forEach(jsonSchemaType => { + jsonSchemaType.properties = resolveJsonSchemaProperties(jsonSchemaType.schema, typesByType); + }); + + return Object.values(typesByType); +} + +function resolveJsonSchemaProperties(jsonSchema, typesByType) { + const properties = jsonSchema['properties']; + if (!properties) { + return []; + } + const requiredProperties = jsonSchema['required'] || []; + const resolvedProperties = []; + Object.entries(properties).forEach(([propertyKey, propertySchema]) => { + const type = propertySchema['type']; + const items = propertySchema['items']; + const ref = propertySchema['$ref']; + const oneOf = propertySchema['oneOf']; + + let isSeq = false; + const isRequired = requiredProperties.includes(propertyKey); + const types = []; + + if (type === 'array' && items) { + isSeq = true; + const itemsType = items['type']; + const itemsRef = items['$ref']; + if (itemsType) { + if (Array.isArray(itemsType)) { + types.push(...itemsType); + } else { + types.push(itemsType); + } + } else if (itemsRef) { + types.push(resolveRef(itemsRef, typesByType).type); + } + } else if (type) { + if (Array.isArray(type)) { + types.push(...type); + } else { + types.push(type); + } + } else if (ref) { + types.push(resolveRef(ref, typesByType).type); + } else if (oneOf) { + types.push('oneOf'); + } + resolvedProperties.push(new JsonSchemaProperty(propertyKey, types, isSeq, isRequired, propertySchema)); + }); + + return resolvedProperties; +} + +export function resolveRef(ref, typesByType) { + let response; + if (ref.startsWith(localDefPrefix)) { + const type = ref.substring(localDefPrefix.length); + response = typesByType[type]; + } else { + response = Object.values(typesByType).find(jsonSchemaType => jsonSchemaType.jsonSchemaRef() === ref); + } + if (!response) { + throw new Error(`Unable to find type for JSON schema ref ${ref}`); + } + return response; +} + +function getDefs(jsonSchema) { + const defs = jsonSchema['$defs']; + if (!defs) { + return {}; + } + return defs; +} + +export class JsonSchemaProperty { + property; + types; + isSeq; + isRequired; + schema; + + constructor(property, types, isSeq, isRequired, schema) { + this.property = property; + this.types = types; + this.isSeq = isSeq; + this.isRequired = isRequired; + this.schema = schema; + } +} + +export class JsonSchemaType { + type; + file; + fileContent; + jsonSchemaPath; + schema; + properties; + + constructor(type, file, fileContent, jsonSchemaPath, schema) { + this.type = type; + this.file = file; + this.fileContent = fileContent; + this.jsonSchemaPath = jsonSchemaPath; + this.schema = schema; + this.properties = []; + } + + jsonSchemaRef() { + let ref = this.file; + if (this.jsonSchemaPath !== '.') { + ref += this.jsonSchemaPath; + } + return ref; + } + + toMetaSchemaType() { + return new MetaSchemaType( + this.type, + this.properties.map(jsonSchemaProperty => new MetaSchemaProperty(jsonSchemaProperty.property, "TODO")), + false + ); + } +} diff --git a/scripts/meta-schema.js b/scripts/meta-schema.js new file mode 100644 index 00000000..e2c44924 --- /dev/null +++ b/scripts/meta-schema.js @@ -0,0 +1,153 @@ + +import { readJsonSchemaTypes } from "./json-schema.js"; +import fs from 'fs'; +import yaml from 'yaml'; +import {metaSchemaFileName, metaSchemaPath} from "./util.js"; + +export function writeMetaSchemaTypes(metaSchemaTypes) { + fs.writeFileSync(metaSchemaPath, yaml.stringify(metaSchemaTypes, { lineWidth: 0 })); +} + +export function readAndFixMetaSchemaTypes() { + // Track messages tracking schema fixes + const messages = []; + + // Read meta schema and sanitize + const metaSchemaContent = fs.readFileSync(metaSchemaPath, "utf-8"); + const metaSchemaDoc = yaml.parse(metaSchemaContent); + const metaSchemaTypes = []; + + if (Array.isArray(metaSchemaDoc)) { + metaSchemaDoc.forEach(rawMetaSchemaType => { + const type = rawMetaSchemaType['type']; + + if (typeof type !== 'string') { + messages.push(`${metaSchemaFileName} contains entry ${JSON.stringify(rawMetaSchemaType)} with invalid type. Ignoring type.`); + return; + } + + const rawProperties = rawMetaSchemaType['properties']; + const isSdkExtensionPlugin = Boolean(rawMetaSchemaType['isSdkExtensionPlugin']); + const metaSchemaProperties = []; + + if (Array.isArray(rawProperties)) { + rawProperties.forEach(rawProperty => { + const property = rawProperty['property']; + if (typeof property !== 'string') { + messages.push(`${metaSchemaFileName} type ${type} contains property ${JSON.stringify(rawProperty)} with invalid property. Ignoring property.`); + return; + } + + let description = rawProperty['description']; + if (typeof description !== 'string') { + messages.push(`${metaSchemaFileName} type ${type} contains property ${property} with invalid description. Ignoring description.`); + description = ''; + } + + metaSchemaProperties.push(new MetaSchemaProperty(property, description)); + }); + } else { + messages.push(`${metaSchemaFileName} contains entry ${JSON.stringify(rawMetaSchemaType)} with invalid properties. Ignoring properties.`); + } + + metaSchemaTypes.push(new MetaSchemaType(type, metaSchemaProperties, isSdkExtensionPlugin)); + }); + } else { + messages.push(`${metaSchemaFileName} must be array of types.`); + } + + const metaSchemaTypesByType = {}; + metaSchemaTypes.forEach(type => metaSchemaTypesByType[type.type] = type); + + const jsonSchemaTypesByType = {}; + readJsonSchemaTypes().forEach(type => jsonSchemaTypesByType[type.type] = type); + + // Find any types in both json schema and meta schema and make sure all json schema properties match + Object.entries(metaSchemaTypesByType).forEach(([type, metaSchemaType]) => { + const jsonSchemaType = jsonSchemaTypesByType[type]; + if (!jsonSchemaType) { + return; + } + const sanitizedProperties = []; + const jsonSchemaProperties = jsonSchemaType.toMetaSchemaType().properties; + + // Remove properties in meta schema and not in json schema + const jsonSchemaPropertiesByProperty = {}; + jsonSchemaProperties.forEach(property => jsonSchemaPropertiesByProperty[property.property] = property); + metaSchemaType.properties.forEach(property => { + const propertyName = property.property; + if (!(propertyName in jsonSchemaPropertiesByProperty)) { + messages.push(`Type ${type} has property ${propertyName} in meta schema and not in JSON schema. Removing.`); + return; + } + sanitizedProperties.push(property); + }); + + // Add properties in json schema and not in meta schema + const metaSchemaPropertiesByProperty = {}; + metaSchemaType.properties.forEach(property => metaSchemaPropertiesByProperty[property.property] = property); + jsonSchemaProperties.forEach(property => { + const propertyName = property.property; + if (!(propertyName in metaSchemaPropertiesByProperty)) { + messages.push(`Type ${type} has property ${propertyName} in JSON schema and not in meta schema. Adding.`); + sanitizedProperties.push(property); + } + }); + + metaSchemaType.properties = sanitizedProperties; + }); + + // Find and remove any types in meta schema not in json schema + Object.entries(metaSchemaTypesByType).forEach(([type, unused]) => { + if (!(type in jsonSchemaTypesByType)) { + messages.push(`Type ${type} found in ${metaSchemaFileName} but not in JSON schema. Removing.`); + delete metaSchemaTypesByType[type]; + } + }); + + // Find and add any types in json schema not in meta schema + Object.entries(jsonSchemaTypesByType).forEach(([type, jsonSchemaType]) => { + if (!(type in metaSchemaTypesByType)) { + messages.push(`Type ${type} in ${jsonSchemaType.file} and path ${jsonSchemaType.jsonSchemaPath} is missing from ${metaSchemaFileName}. Adding.`); + const metaSchemaType = jsonSchemaType.toMetaSchemaType(); + metaSchemaTypesByType[metaSchemaType.type] = metaSchemaType; + } + }); + + return { messages, types: Object.values(metaSchemaTypesByType) }; +} + +export class MetaSchemaProperty { + property; + description; + + constructor(property, description) { + this.property = property; + this.description = description; + } + + toJson() { + return { property: this.property, description: this.description }; + } +} + +export class MetaSchemaType { + type; + properties; + isSdkExtensionPlugin; + // TODO: track language implementation status + + constructor(type, properties, isSdkExtensionPlugin) { + this.type = type; + this.properties = properties; + this.isSdkExtensionPlugin = isSdkExtensionPlugin; + + } + + toJson() { + const properties = this.properties.map(property => property.toJson()); + properties.sort((a, b) => a.property.localeCompare(b.property)); + + return { type: this.type, properties: this.properties, isSdkExtensionPlugin: this.isSdkExtensionPlugin }; + } +} diff --git a/scripts/util.js b/scripts/util.js new file mode 100644 index 00000000..738c7869 --- /dev/null +++ b/scripts/util.js @@ -0,0 +1,10 @@ +import path from 'path'; +import { fileURLToPath } from 'url'; + +const __filename = fileURLToPath(import.meta.url); +const __dirname = path.dirname(__filename); + +export const metaSchemaFileName = "meta_schema.yaml"; +export const schemaDirPath = __dirname + "/../schema/"; +export const metaSchemaPath = schemaDirPath + metaSchemaFileName; +export const markdownDocPath = __dirname + "/../schema-docs.md";