diff --git a/.github/workflows/build-check.yaml b/.github/workflows/build-check.yaml index c4516626..96111b94 100644 --- a/.github/workflows/build-check.yaml +++ b/.github/workflows/build-check.yaml @@ -33,7 +33,7 @@ jobs: # need to "git add" to detect any changes to descriptions which are not checked in # select files from locations managed by meta schema git add examples** - git add schema/meta_schema.yaml + git add schema/meta_schema_* git add schema-docs.md if git diff --cached --quiet then diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 7475759e..6df3dbc2 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -249,13 +249,82 @@ make all ## Meta schema -[meta_schema.yaml](./schema/meta_schema.yaml) tracks schema details that don't fit neatly into the JSON schema including: +[meta_schema_*.yaml](schema) files track 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) +* Implementation support status -There are variety of tasks which intersect with the meta schema: +The meta schema is broken across multiple files for improved maintainability: + +* [meta_schema_types.yaml](#meta_schema_typesyaml) +* [meta_schema_language_{language}.yaml](#meta_schema_language_languageyaml) + +There are a variety of build tasks which intersect with the meta schema: + +* [make fix-meta-schema](#make-fix-meta-schema) +* [make generate-markdown](#make-generate-markdown) +* [make generate-descriptions](#make-generate-descriptions) +* [make all-meta-schema](#make-all-meta-schema) + +### `meta_schema_types.yaml` + +[meta_schema_types.yaml](schema/meta_schema_types.yaml) contains property descriptions, semantics, and SDK extension plugin information. + +Content looks like: + +```yaml +- 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. +# other types omitted for brevity +``` + +Notes: + +* `[]` the document is an array of entries for each type in the JSON schema. + * `[].type` is the name of the JSON schema type. **Maintained automatically by build tooling.** + * `[].properties` is an array of entries for each property in the JSON schema type. + * `[].properties[].property` the name of the property. **Maintained automatically by build tooling.** + * `[].properties[].description` the property description, including semantics and default behavior. + +### `meta_schema_language_{language}.yaml` + +These files track language implementation status for a particular language. See [fix-meta-schema](#make-fix-meta-schema) for details on adding a new language. + +Content looks like: + +```yaml +latestSupportedFileFormat: 1.0.0-rc.1 +typeSupportStatuses: + - type: Base2ExponentialBucketHistogramAggregation + status: supported # the support status, see below for allowed enum values + notes: "" + propertyOverrides: + - property: record_min_max + status: ignored + # other types omitted for brevity + ``` + +Notes: + +* `.latestSupportedFileFormat` is the latest version of `opentelemetry-configuration` supported by the `{language}` +* `.typeSupportStatuses` is an array with entries for each type in the JSON schema. + * `.typeSupportStatuses[].type` is the name of the JSON schema type. **Maintained automatically by build tooling.** + * `.typeSupportStatuses[].status` captures the support status of the type and all properties except overrides in `.typeSupportStatuses[].propertyOverrides`. See enum options below. + * `.typeSupportStatuses[].propertyOverrides` an array of properties which have different support statuses than the overall type as recorded in `.typeSupportStatuses[].status. + * `.typeSupportStatuses[].propertyOverrides[].property` the name of the property whose support status is overridden. + * `.typeSupportStatuses[].propertyOverrides[].status` the overridden support status. See enum options below. +* Status enum options, applicable to `.typeSupportStatuses[].status`, `.typeSupportStatuses[].propertyOverrides[].status`: + * `unknown`: Language maintainer has not yet recorded a status. + * `suppported`: The type / property is supported by the language implementation. + * `not_implemented`: The type / property is not parsed / recognized by the language implementation because the concept is not yet implemented but should be eventually. + * `not_applicable`: The type / property is not parsed / recognized by the language implementation because the concept is not applicable. E.g. C++ specific instrumentation for Java. + * `ignored`: The type / property is not parsed / recognized by the language implementation despite the concept being available in the language's programmatic configuration API. ### `make fix-meta-schema` @@ -266,6 +335,13 @@ Ensures that the JSON schema and the meta schema are kept in sync: * 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. +* If a language implementation is known (i.e. defined in constant array `KNOWN_LANGUAGES` in [meta-schema.js](./scripts/meta-schema.js)) but not in meta schema, add it. +* If a language implementation exists in meta schema but is not known, delete it. +* For each language implementation: + * If a type exists in the JSON schema and not in the language implementation's type support status of the meta schema, add it. + * If a type exists in the language implementation's type support status of the meta schema and no in the JSON schema, delete it. + * For each property in a type's propertyOverrides: + * If the property does not exist in 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. diff --git a/schema-docs.md b/schema-docs.md index 698b1b3d..2f0a6658 100644 --- a/schema-docs.md +++ b/schema-docs.md @@ -93,6 +93,8 @@ * [ViewSelector](#viewselector) * [ViewStream](#viewstream) * [ZipkinSpanExporter](#zipkinspanexporter) +* [Language Support Status](#language-support-status) + * [java](#java) * [SDK Extension Plugins](#sdk-extension-plugins) @@ -112,6 +114,19 @@ TODO | `last_value` | [`LastValueAggregation`](#lastvalueaggregation) | `false` | No constraints. | TODO | | `sum` | [`SumAggregation`](#sumaggregation) | `false` | No constraints. | TODO | +
+Language support status + +| Property | [java](#java) | +|---|---| +| `default` | supported | +| `drop` | supported | +| `explicit_bucket_histogram` | supported | +| `base2_exponential_bucket_histogram` | supported | +| `last_value` | supported | +| `sum` | supported | +
+ Constraints: * `additionalProperties`: `false` @@ -211,6 +226,15 @@ Usages: | `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.
| +
+Language support status + +| Property | [java](#java) | +|---|---| +| `attribute_value_length_limit` | supported | +| `attribute_count_limit` | supported | +
+ Constraints: * `additionalProperties`: `true` @@ -251,6 +275,16 @@ Usages: | `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.
| +
+Language support status + +| Property | [java](#java) | +|---|---| +| `name` | supported | +| `value` | supported | +| `type` | supported | +
+ Constraints: * `additionalProperties`: `false` @@ -434,6 +468,16 @@ Usages: | `max_size` | one of:
* `integer`
* `null`
| `false` | No constraints. | TODO | | `record_min_max` | one of:
* `boolean`
* `null`
| `false` | No constraints. | TODO | +
+Language support status + +| Property | [java](#java) | +|---|---| +| `max_scale` | supported | +| `max_size` | supported | +| `record_min_max` | ignored | +
+ Constraints: * `additionalProperties`: `false` @@ -485,6 +529,18 @@ Usages: | `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. | +
+Language support status + +| Property | [java](#java) | +|---|---| +| `schedule_delay` | supported | +| `export_timeout` | supported | +| `max_queue_size` | supported | +| `max_export_batch_size` | supported | +| `exporter` | supported | +
+ Constraints: * `additionalProperties`: `false` @@ -550,6 +606,18 @@ Usages: | `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. | +
+Language support status + +| Property | [java](#java) | +|---|---| +| `schedule_delay` | supported | +| `export_timeout` | supported | +| `max_queue_size` | supported | +| `max_export_batch_size` | supported | +| `exporter` | supported | +
+ Constraints: * `additionalProperties`: `false` @@ -618,6 +686,21 @@ Usages: | `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.
| +
+Language support status + +| Property | [java](#java) | +|---|---| +| `default` | supported | +| `counter` | supported | +| `gauge` | supported | +| `histogram` | supported | +| `observable_counter` | supported | +| `observable_gauge` | supported | +| `observable_up_down_counter` | supported | +| `up_down_counter` | supported | +
+ Constraints: * `additionalProperties`: `false` @@ -833,6 +916,15 @@ Usages: | `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/
| +
+Language support status + +| Property | [java](#java) | +|---|---| +| `peer` | supported | +| `http` | supported | +
+ Constraints: * `additionalProperties`: `false` @@ -891,6 +983,15 @@ Usages: | `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.
| +
+Language support status + +| Property | [java](#java) | +|---|---| +| `request_captured_headers` | supported | +| `response_captured_headers` | supported | +
+ Constraints: * `additionalProperties`: `false` @@ -930,6 +1031,15 @@ Usages: | `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. | +
+Language support status + +| Property | [java](#java) | +|---|---| +| `client` | supported | +| `server` | supported | +
+ Constraints: * `additionalProperties`: `false` @@ -963,6 +1073,15 @@ Usages: | `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.
| +
+Language support status + +| Property | [java](#java) | +|---|---| +| `request_captured_headers` | supported | +| `response_captured_headers` | supported | +
+ Constraints: * `additionalProperties`: `false` @@ -1012,6 +1131,25 @@ Usages: | `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.
| +
+Language support status + +| Property | [java](#java) | +|---|---| +| `general` | supported | +| `cpp` | supported | +| `dotnet` | supported | +| `erlang` | supported | +| `go` | supported | +| `java` | supported | +| `js` | supported | +| `php` | supported | +| `python` | supported | +| `ruby` | supported | +| `rust` | supported | +| `swift` | supported | +
+ Constraints: * `additionalProperties`: `false` @@ -1206,6 +1344,14 @@ Usages: |---|---|---|---|---| | `disabled` | `boolean` | `false` | No constraints. | Configure if the logger is enabled or not. | +
+Language support status + +| Property | [java](#java) | +|---|---| +| `disabled` | supported | +
+ Constraints: * `additionalProperties`: `false` @@ -1241,6 +1387,15 @@ Usages: | `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. | +
+Language support status + +| Property | [java](#java) | +|---|---| +| `default_config` | supported | +| `loggers` | supported | +
+ Constraints: * `additionalProperties`: `false` @@ -1279,6 +1434,15 @@ Usages: | `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. | +
+Language support status + +| Property | [java](#java) | +|---|---| +| `name` | supported | +| `config` | supported | +
+ Constraints: * `additionalProperties`: `false` @@ -1315,6 +1479,14 @@ Usages: |---|---|---|---|---| | `disabled` | `boolean` | `false` | No constraints. | Configure if the meter is enabled or not. | +
+Language support status + +| Property | [java](#java) | +|---|---| +| `disabled` | supported | +
+ Constraints: * `additionalProperties`: `false` @@ -1350,6 +1522,15 @@ Usages: | `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. | +
+Language support status + +| Property | [java](#java) | +|---|---| +| `default_config` | supported | +| `meters` | supported | +
+ Constraints: * `additionalProperties`: `false` @@ -1388,6 +1569,15 @@ Usages: | `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. | +
+Language support status + +| Property | [java](#java) | +|---|---| +| `name` | supported | +| `config` | supported | +
+ Constraints: * `additionalProperties`: `false` @@ -1424,6 +1614,14 @@ Usages: |---|---|---|---|---| | `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.
| +
+Language support status + +| Property | [java](#java) | +|---|---| +| `output_stream` | supported | +
+ Constraints: * `additionalProperties`: `false` @@ -1462,6 +1660,16 @@ Usages: | `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.
| +
+Language support status + +| Property | [java](#java) | +|---|---| +| `output_stream` | supported | +| `temporality_preference` | supported | +| `default_histogram_aggregation` | supported | +
+ Constraints: * `additionalProperties`: `false` @@ -1503,6 +1711,14 @@ Usages: |---|---|---|---|---| | `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
| +
+Language support status + +| Property | [java](#java) | +|---|---| +| `service_mapping` | supported | +
+ Constraints: * `additionalProperties`: `false` @@ -1536,6 +1752,15 @@ Usages: | `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.
| +
+Language support status + +| Property | [java](#java) | +|---|---| +| `peer` | supported | +| `service` | supported | +
+ Constraints: * `additionalProperties`: `false` @@ -1602,6 +1827,18 @@ Usages: | `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.
| +
+Language support status + +| Property | [java](#java) | +|---|---| +| `host` | supported | +| `port` | supported | +| `without_scope_info` | ignored | +| `with_resource_constant_labels` | supported | +| `translation_strategy` | not_implemented | +
+ Constraints: * `additionalProperties`: `false` @@ -1665,6 +1902,15 @@ Usages: | `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.
| +
+Language support status + +| Property | [java](#java) | +|---|---| +| `attributes` | supported | +| `detectors` | supported | +
+ Constraints: * `additionalProperties`: `false` @@ -1705,6 +1951,17 @@ Usages: | `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.
| +
+Language support status + +| Property | [java](#java) | +|---|---| +| `container` | supported | +| `host` | supported | +| `process` | supported | +| `service` | supported | +
+ Constraints: * `additionalProperties`: `{"type":["object","null"]}` @@ -1777,6 +2034,14 @@ Usages: |---|---|---|---|---| | `disabled` | `boolean` | `false` | No constraints. | Configure if the tracer is enabled or not. | +
+Language support status + +| Property | [java](#java) | +|---|---| +| `disabled` | supported | +
+ Constraints: * `additionalProperties`: `false` @@ -1812,6 +2077,15 @@ Usages: | `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. | +
+Language support status + +| Property | [java](#java) | +|---|---| +| `default_config` | supported | +| `tracers` | supported | +
+ Constraints: * `additionalProperties`: `false` @@ -1850,6 +2124,15 @@ Usages: | `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. | +
+Language support status + +| Property | [java](#java) | +|---|---| +| `name` | supported | +| `config` | supported | +
+ Constraints: * `additionalProperties`: `false` @@ -1887,6 +2170,15 @@ Usages: | `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.
| +
+Language support status + +| Property | [java](#java) | +|---|---| +| `boundaries` | supported | +| `record_min_max` | supported | +
+ Constraints: * `additionalProperties`: `false` @@ -1992,6 +2284,17 @@ Usages: | `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.
| | `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.
| +
+Language support status + +| Property | [java](#java) | +|---|---| +| `certificate_file` | unknown | +| `client_key_file` | unknown | +| `client_certificate_file` | unknown | +| `insecure` | not_applicable | +
+ Constraints: * `additionalProperties`: `false` @@ -2048,6 +2351,16 @@ Usages: | `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.
| +
+Language support status + +| Property | [java](#java) | +|---|---| +| `certificate_file` | unknown | +| `client_key_file` | unknown | +| `client_certificate_file` | unknown | +
+ Constraints: * `additionalProperties`: `false` @@ -2097,6 +2410,15 @@ Usages: | `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.
| +
+Language support status + +| Property | [java](#java) | +|---|---| +| `included` | supported | +| `excluded` | supported | +
+ Constraints: * `additionalProperties`: `false` @@ -2197,6 +2519,16 @@ Usages: | `interval` | one of:
* `integer`
* `null`
| `false` | * `minimum`: `0`
| TODO | | `initial_sampler` | [`Sampler`](#sampler) | `false` | No constraints. | TODO | +
+Language support status + +| Property | [java](#java) | +|---|---| +| `endpoint` | supported | +| `interval` | supported | +| `initial_sampler` | supported | +
+ Constraints: * `additionalProperties`: `false` @@ -2269,6 +2601,16 @@ Usages: | `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.
| +
+Language support status + +| Property | [java](#java) | +|---|---| +| `processors` | supported | +| `limits` | supported | +| `logger_configurator/development` | supported | +
+ Constraints: * `additionalProperties`: `false` @@ -2482,6 +2824,17 @@ Usages: | `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. | +
+Language support status + +| Property | [java](#java) | +|---|---| +| `otlp_http` | supported | +| `otlp_grpc` | supported | +| `otlp_file/development` | supported | +| `console` | supported | +
+ Constraints: * `additionalProperties`: `{"type":["object","null"]}` @@ -2531,6 +2884,15 @@ Usages: | `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.
| +
+Language support status + +| Property | [java](#java) | +|---|---| +| `attribute_value_length_limit` | supported | +| `attribute_count_limit` | supported | +
+ Constraints: * `additionalProperties`: `false` @@ -2574,6 +2936,15 @@ Usages: | `batch` | [`BatchLogRecordProcessor`](#batchlogrecordprocessor) | `false` | No constraints. | Configure a batch log record processor. | | `simple` | [`SimpleLogRecordProcessor`](#simplelogrecordprocessor) | `false` | No constraints. | Configure a simple log record processor. | +
+Language support status + +| Property | [java](#java) | +|---|---| +| `batch` | supported | +| `simple` | supported | +
+ Constraints: * `additionalProperties`: `{"type":["object"]}` @@ -2617,6 +2988,17 @@ Usages: | `exemplar_filter` | [`ExemplarFilter`](#exemplarfilter) | `false` | No constraints. | Configure the exemplar filter.
Values include: trace_based, always_on, always_off. For behavior of values see https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/configuration/sdk-environment-variables.md#metrics-sdk-configuration.
If omitted or null, trace_based is used.
| | `meter_configurator/development` | [`ExperimentalMeterConfigurator`](#experimentalmeterconfigurator) | `false` | No constraints. | Configure meters.
This type is in development and subject to breaking changes in minor versions.
| +
+Language support status + +| Property | [java](#java) | +|---|---| +| `readers` | supported | +| `views` | supported | +| `exemplar_filter` | supported | +| `meter_configurator/development` | supported | +
+ Constraints: * `additionalProperties`: `false` @@ -3311,6 +3693,14 @@ Usages: |---|---|---|---|---| | `opencensus` | [`OpenCensusMetricProducer`](#opencensusmetricproducer) | `false` | No constraints. | Configure metric producer to be opencensus. | +
+Language support status + +| Property | [java](#java) | +|---|---| +| `opencensus` | supported | +
+ Constraints: * `additionalProperties`: `{"type":["object","null"]}` @@ -3351,6 +3741,15 @@ Usages: | `periodic` | [`PeriodicMetricReader`](#periodicmetricreader) | `false` | No constraints. | Configure a periodic metric reader. | | `pull` | [`PullMetricReader`](#pullmetricreader) | `false` | No constraints. | Configure a pull based metric reader. | +
+Language support status + +| Property | [java](#java) | +|---|---| +| `periodic` | supported | +| `pull` | supported | +
+ Constraints: * `additionalProperties`: `false` @@ -3388,6 +3787,15 @@ Usages: | `name` | `string` | `true` | No constraints. | The name of the pair. | | `value` | one of:
* `string`
* `null`
| `true` | No constraints. | The value of the pair. | +
+Language support status + +| Property | [java](#java) | +|---|---| +| `name` | supported | +| `value` | supported | +
+ Constraints: * `additionalProperties`: `false` @@ -3465,6 +3873,23 @@ Usages: | `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.
| +
+Language support status + +| Property | [java](#java) | +|---|---| +| `file_format` | supported | +| `disabled` | supported | +| `log_level` | supported | +| `attribute_limits` | supported | +| `logger_provider` | supported | +| `meter_provider` | supported | +| `propagator` | supported | +| `tracer_provider` | supported | +| `resource` | supported | +| `instrumentation/development` | supported | +
+ Constraints: * `additionalProperties`: `true` @@ -3600,6 +4025,19 @@ Usages: | `timeout` | one of:
* `integer`
* `null`
| `false` | * `minimum`: `0`
| Configure max time (in milliseconds) to wait for each export.
Value must be non-negative. A value of 0 indicates no limit (infinity).
If omitted or null, 10000 is used.
| | `tls` | [`GrpcTls`](#grpctls) | `false` | No constraints. | Configure TLS settings for the exporter. | +
+Language support status + +| Property | [java](#java) | +|---|---| +| `endpoint` | supported | +| `headers` | supported | +| `headers_list` | supported | +| `compression` | supported | +| `timeout` | supported | +| `tls` | supported | +
+ Constraints: * `additionalProperties`: `false` @@ -3671,6 +4109,21 @@ Usages: | `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.
| | `tls` | [`GrpcTls`](#grpctls) | `false` | No constraints. | Configure TLS settings for the exporter. | +
+Language support status + +| Property | [java](#java) | +|---|---| +| `endpoint` | supported | +| `headers` | supported | +| `headers_list` | supported | +| `compression` | supported | +| `timeout` | supported | +| `temporality_preference` | supported | +| `default_histogram_aggregation` | supported | +| `tls` | supported | +
+ Constraints: * `additionalProperties`: `false` @@ -3775,6 +4228,20 @@ Usages: | `encoding` | [`OtlpHttpEncoding`](#otlphttpencoding) | `false` | No constraints. | Configure the encoding used for messages.
Values include: protobuf, json. Implementations may not support json.
If omitted or null, protobuf is used.
| | `tls` | [`HttpTls`](#httptls) | `false` | No constraints. | Configure TLS settings for the exporter. | +
+Language support status + +| Property | [java](#java) | +|---|---| +| `endpoint` | supported | +| `headers` | supported | +| `headers_list` | supported | +| `compression` | supported | +| `timeout` | supported | +| `encoding` | supported | +| `tls` | supported | +
+ Constraints: * `additionalProperties`: `false` @@ -3851,6 +4318,23 @@ Usages: | `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.
| | `tls` | [`HttpTls`](#httptls) | `false` | No constraints. | Configure TLS settings for the exporter. | +
+Language support status + +| Property | [java](#java) | +|---|---| +| `endpoint` | supported | +| `endpoint` | supported | +| `headers` | supported | +| `headers_list` | supported | +| `compression` | supported | +| `timeout` | supported | +| `encoding` | supported | +| `temporality_preference` | supported | +| `default_histogram_aggregation` | supported | +| `tls` | supported | +
+ Constraints: * `additionalProperties`: `false` @@ -3927,6 +4411,18 @@ Usages: | `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.
| +
+Language support status + +| Property | [java](#java) | +|---|---| +| `root` | supported | +| `remote_parent_sampled` | supported | +| `remote_parent_not_sampled` | supported | +| `local_parent_sampled` | supported | +| `local_parent_not_sampled` | supported | +
+ Constraints: * `additionalProperties`: `false` @@ -3975,6 +4471,18 @@ Usages: | `producers` | `array` of [`MetricProducer`](#metricproducer) | `false` | No constraints. | Configure metric producers. | | `cardinality_limits` | [`CardinalityLimits`](#cardinalitylimits) | `false` | No constraints. | Configure cardinality limits. | +
+Language support status + +| Property | [java](#java) | +|---|---| +| `interval` | supported | +| `timeout` | supported | +| `exporter` | supported | +| `producers` | supported | +| `cardinality_limits` | supported | +
+ Constraints: * `additionalProperties`: `false` @@ -4032,6 +4540,15 @@ Usages: | `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.
| +
+Language support status + +| Property | [java](#java) | +|---|---| +| `composite` | supported | +| `composite_list` | supported | +
+ No constraints. Usages: @@ -4146,6 +4663,14 @@ Usages: |---|---|---|---|---| | `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.
| +
+Language support status + +| Property | [java](#java) | +|---|---| +| `prometheus/development` | supported | +
+ Constraints: * `additionalProperties`: `{"type":["object","null"]}` @@ -4188,6 +4713,16 @@ Usages: | `producers` | `array` of [`MetricProducer`](#metricproducer) | `false` | No constraints. | Configure metric producers. | | `cardinality_limits` | [`CardinalityLimits`](#cardinalitylimits) | `false` | No constraints. | Configure cardinality limits. | +
+Language support status + +| Property | [java](#java) | +|---|---| +| `exporter` | supported | +| `producers` | supported | +| `cardinality_limits` | supported | +
+ Constraints: * `additionalProperties`: `false` @@ -4235,6 +4770,17 @@ Usages: | `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.
| +
+Language support status + +| Property | [java](#java) | +|---|---| +| `otlp_http` | supported | +| `otlp_grpc` | supported | +| `otlp_file/development` | supported | +| `console` | supported | +
+ Constraints: * `additionalProperties`: `{"type":["object","null"]}` @@ -4285,6 +4831,17 @@ Usages: | `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.
| +
+Language support status + +| Property | [java](#java) | +|---|---| +| `attributes` | supported | +| `detection/development` | supported | +| `schema_url` | supported | +| `attributes_list` | supported | +
+ Constraints: * `additionalProperties`: `false` @@ -4477,6 +5034,18 @@ Usages: | `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. | +
+Language support status + +| Property | [java](#java) | +|---|---| +| `always_off` | supported | +| `always_on` | supported | +| `jaeger_remote` | supported | +| `parent_based` | supported | +| `trace_id_ratio_based` | supported | +
+ Constraints: * `additionalProperties`: `{"type":["object","null"]}` @@ -4533,6 +5102,14 @@ Usages: |---|---|---|---|---| | `exporter` | [`LogRecordExporter`](#logrecordexporter) | `true` | No constraints. | Configure exporter. | +
+Language support status + +| Property | [java](#java) | +|---|---| +| `exporter` | supported | +
+ Constraints: * `additionalProperties`: `false` @@ -4566,6 +5143,14 @@ Usages: |---|---|---|---|---| | `exporter` | [`SpanExporter`](#spanexporter) | `true` | No constraints. | Configure exporter. | +
+Language support status + +| Property | [java](#java) | +|---|---| +| `exporter` | supported | +
+ Constraints: * `additionalProperties`: `false` @@ -4605,6 +5190,18 @@ Usages: | `console` | [`ConsoleExporter`](#consoleexporter) | `false` | No constraints. | Configure exporter to be console. | | `zipkin` | [`ZipkinSpanExporter`](#zipkinspanexporter) | `false` | No constraints. | Configure exporter to be zipkin. | +
+Language support status + +| Property | [java](#java) | +|---|---| +| `otlp_http` | supported | +| `otlp_grpc` | supported | +| `otlp_file/development` | supported | +| `console` | supported | +| `zipkin` | supported | +
+ Constraints: * `additionalProperties`: `{"type":["object","null"]}` @@ -4661,6 +5258,19 @@ Usages: | `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.
| +
+Language support status + +| Property | [java](#java) | +|---|---| +| `attribute_value_length_limit` | supported | +| `attribute_count_limit` | supported | +| `event_count_limit` | supported | +| `link_count_limit` | supported | +| `event_attribute_count_limit` | supported | +| `link_attribute_count_limit` | supported | +
+ Constraints: * `additionalProperties`: `false` @@ -4732,6 +5342,15 @@ Usages: | `batch` | [`BatchSpanProcessor`](#batchspanprocessor) | `false` | No constraints. | Configure a batch span processor. | | `simple` | [`SimpleSpanProcessor`](#simplespanprocessor) | `false` | No constraints. | Configure a simple span processor. | +
+Language support status + +| Property | [java](#java) | +|---|---| +| `batch` | supported | +| `simple` | supported | +
+ Constraints: * `additionalProperties`: `{"type":["object","null"]}` @@ -4805,6 +5424,19 @@ Usages: | `jaeger` | [`JaegerPropagator`](#jaegerpropagator) | `false` | No constraints. | Include the jaeger propagator. | | `ottrace` | [`OpenTracingPropagator`](#opentracingpropagator) | `false` | No constraints. | Include the opentracing propagator. | +
+Language support status + +| Property | [java](#java) | +|---|---| +| `tracecontext` | supported | +| `baggage` | supported | +| `b3` | supported | +| `b3multi` | supported | +| `jaeger` | supported | +| `ottrace` | supported | +
+ Constraints: * `additionalProperties`: `{"type":["object","null"]}` @@ -4883,6 +5515,14 @@ Usages: |---|---|---|---|---| | `ratio` | one of:
* `number`
* `null`
| `false` | No constraints. | Configure trace_id_ratio.
If omitted or null, 1.0 is used.
| +
+Language support status + +| Property | [java](#java) | +|---|---| +| `ratio` | supported | +
+ Constraints: * `additionalProperties`: `false` @@ -4921,6 +5561,17 @@ Usages: | `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.
| +
+Language support status + +| Property | [java](#java) | +|---|---| +| `processors` | supported | +| `limits` | supported | +| `sampler` | supported | +| `tracer_configurator/development` | supported | +
+ Constraints: * `additionalProperties`: `false` @@ -5293,6 +5944,15 @@ Usages: | `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. | +
+Language support status + +| Property | [java](#java) | +|---|---| +| `selector` | supported | +| `stream` | supported | +
+ Constraints: * `additionalProperties`: `false` @@ -5330,6 +5990,19 @@ Usages: | `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.
| +
+Language support status + +| Property | [java](#java) | +|---|---| +| `instrument_name` | supported | +| `instrument_type` | supported | +| `unit` | supported | +| `meter_name` | supported | +| `meter_version` | supported | +| `meter_schema_url` | supported | +
+ Constraints: * `additionalProperties`: `false` @@ -5393,6 +6066,18 @@ Usages: | `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).
| +
+Language support status + +| Property | [java](#java) | +|---|---| +| `name` | supported | +| `description` | supported | +| `aggregation` | supported | +| `aggregation_cardinality_limit` | supported | +| `attribute_keys` | supported | +
+ Constraints: * `additionalProperties`: `false` @@ -5445,6 +6130,15 @@ Usages: | `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.
| +
+Language support status + +| Property | [java](#java) | +|---|---| +| `endpoint` | supported | +| `timeout` | supported | +
+ Constraints: * `additionalProperties`: `false` @@ -5481,6 +6175,107 @@ Usages: } +# Language Support Status + +## java + +Latest supported file format: `1.0.0-rc.1` + +| Type | Status | Notes | Property Support Status | +|---|---|---|---| +| [`Aggregation`](#aggregation) | supported | | * `default`: supported
* `drop`: supported
* `explicit_bucket_histogram`: supported
* `base2_exponential_bucket_histogram`: supported
* `last_value`: supported
* `sum`: supported
| +| [`AlwaysOffSampler`](#alwaysoffsampler) | supported | | | +| [`AlwaysOnSampler`](#alwaysonsampler) | supported | | | +| [`AttributeLimits`](#attributelimits) | supported | | * `attribute_value_length_limit`: supported
* `attribute_count_limit`: supported
| +| [`AttributeNameValue`](#attributenamevalue) | supported | | * `name`: supported
* `value`: supported
* `type`: supported
| +| [`AttributeType`](#attributetype) | supported | | | +| [`B3MultiPropagator`](#b3multipropagator) | supported | | | +| [`B3Propagator`](#b3propagator) | supported | | | +| [`BaggagePropagator`](#baggagepropagator) | supported | | | +| [`Base2ExponentialBucketHistogramAggregation`](#base2exponentialbuckethistogramaggregation) | supported | | * `max_scale`: supported
* `max_size`: supported
* `record_min_max`: ignored
| +| [`BatchLogRecordProcessor`](#batchlogrecordprocessor) | supported | | * `schedule_delay`: supported
* `export_timeout`: supported
* `max_queue_size`: supported
* `max_export_batch_size`: supported
* `exporter`: supported
| +| [`BatchSpanProcessor`](#batchspanprocessor) | supported | | * `schedule_delay`: supported
* `export_timeout`: supported
* `max_queue_size`: supported
* `max_export_batch_size`: supported
* `exporter`: supported
| +| [`CardinalityLimits`](#cardinalitylimits) | supported | | * `default`: supported
* `counter`: supported
* `gauge`: supported
* `histogram`: supported
* `observable_counter`: supported
* `observable_gauge`: supported
* `observable_up_down_counter`: supported
* `up_down_counter`: supported
| +| [`ConsoleExporter`](#consoleexporter) | supported | | | +| [`DefaultAggregation`](#defaultaggregation) | supported | | | +| [`DropAggregation`](#dropaggregation) | supported | | | +| [`ExemplarFilter`](#exemplarfilter) | supported | | | +| [`ExperimentalContainerResourceDetector`](#experimentalcontainerresourcedetector) | supported | | | +| [`ExperimentalGeneralInstrumentation`](#experimentalgeneralinstrumentation) | supported | | * `peer`: supported
* `http`: supported
| +| [`ExperimentalHostResourceDetector`](#experimentalhostresourcedetector) | supported | | | +| [`ExperimentalHttpClientInstrumentation`](#experimentalhttpclientinstrumentation) | supported | | * `request_captured_headers`: supported
* `response_captured_headers`: supported
| +| [`ExperimentalHttpInstrumentation`](#experimentalhttpinstrumentation) | supported | | * `client`: supported
* `server`: supported
| +| [`ExperimentalHttpServerInstrumentation`](#experimentalhttpserverinstrumentation) | supported | | * `request_captured_headers`: supported
* `response_captured_headers`: supported
| +| [`ExperimentalInstrumentation`](#experimentalinstrumentation) | supported | | * `general`: supported
* `cpp`: supported
* `dotnet`: supported
* `erlang`: supported
* `go`: supported
* `java`: supported
* `js`: supported
* `php`: supported
* `python`: supported
* `ruby`: supported
* `rust`: supported
* `swift`: supported
| +| [`ExperimentalLanguageSpecificInstrumentation`](#experimentallanguagespecificinstrumentation) | supported | | | +| [`ExperimentalLoggerConfig`](#experimentalloggerconfig) | supported | | * `disabled`: supported
| +| [`ExperimentalLoggerConfigurator`](#experimentalloggerconfigurator) | supported | | * `default_config`: supported
* `loggers`: supported
| +| [`ExperimentalLoggerMatcherAndConfig`](#experimentalloggermatcherandconfig) | supported | | * `name`: supported
* `config`: supported
| +| [`ExperimentalMeterConfig`](#experimentalmeterconfig) | supported | | * `disabled`: supported
| +| [`ExperimentalMeterConfigurator`](#experimentalmeterconfigurator) | supported | | * `default_config`: supported
* `meters`: supported
| +| [`ExperimentalMeterMatcherAndConfig`](#experimentalmetermatcherandconfig) | supported | | * `name`: supported
* `config`: supported
| +| [`ExperimentalOtlpFileExporter`](#experimentalotlpfileexporter) | supported | | * `output_stream`: supported
| +| [`ExperimentalOtlpFileMetricExporter`](#experimentalotlpfilemetricexporter) | supported | | * `output_stream`: supported
* `temporality_preference`: supported
* `default_histogram_aggregation`: supported
| +| [`ExperimentalPeerInstrumentation`](#experimentalpeerinstrumentation) | supported | | * `service_mapping`: supported
| +| [`ExperimentalPeerServiceMapping`](#experimentalpeerservicemapping) | supported | | * `peer`: supported
* `service`: supported
| +| [`ExperimentalProcessResourceDetector`](#experimentalprocessresourcedetector) | supported | | | +| [`ExperimentalPrometheusMetricExporter`](#experimentalprometheusmetricexporter) | supported | | * `host`: supported
* `port`: supported
* `without_scope_info`: ignored
* `with_resource_constant_labels`: supported
* `translation_strategy`: not_implemented
| +| [`ExperimentalResourceDetection`](#experimentalresourcedetection) | supported | | * `attributes`: supported
* `detectors`: supported
| +| [`ExperimentalResourceDetector`](#experimentalresourcedetector) | supported | | * `container`: supported
* `host`: supported
* `process`: supported
* `service`: supported
| +| [`ExperimentalServiceResourceDetector`](#experimentalserviceresourcedetector) | supported | | | +| [`ExperimentalTracerConfig`](#experimentaltracerconfig) | supported | | * `disabled`: supported
| +| [`ExperimentalTracerConfigurator`](#experimentaltracerconfigurator) | supported | | * `default_config`: supported
* `tracers`: supported
| +| [`ExperimentalTracerMatcherAndConfig`](#experimentaltracermatcherandconfig) | supported | | * `name`: supported
* `config`: supported
| +| [`ExplicitBucketHistogramAggregation`](#explicitbuckethistogramaggregation) | supported | | * `boundaries`: supported
* `record_min_max`: supported
| +| [`ExporterDefaultHistogramAggregation`](#exporterdefaulthistogramaggregation) | supported | | | +| [`ExporterTemporalityPreference`](#exportertemporalitypreference) | supported | | | +| [`GrpcTls`](#grpctls) | unknown | | * `certificate_file`: unknown
* `client_key_file`: unknown
* `client_certificate_file`: unknown
* `insecure`: not_applicable
| +| [`HttpTls`](#httptls) | unknown | | * `certificate_file`: unknown
* `client_key_file`: unknown
* `client_certificate_file`: unknown
| +| [`IncludeExclude`](#includeexclude) | supported | | * `included`: supported
* `excluded`: supported
| +| [`InstrumentType`](#instrumenttype) | supported | | | +| [`JaegerPropagator`](#jaegerpropagator) | supported | | | +| [`JaegerRemoteSampler`](#jaegerremotesampler) | supported | | * `endpoint`: supported
* `interval`: supported
* `initial_sampler`: supported
| +| [`LastValueAggregation`](#lastvalueaggregation) | supported | | | +| [`LoggerProvider`](#loggerprovider) | supported | | * `processors`: supported
* `limits`: supported
* `logger_configurator/development`: supported
| +| [`LogRecordExporter`](#logrecordexporter) | supported | | * `otlp_http`: supported
* `otlp_grpc`: supported
* `otlp_file/development`: supported
* `console`: supported
| +| [`LogRecordLimits`](#logrecordlimits) | supported | | * `attribute_value_length_limit`: supported
* `attribute_count_limit`: supported
| +| [`LogRecordProcessor`](#logrecordprocessor) | supported | | * `batch`: supported
* `simple`: supported
| +| [`MeterProvider`](#meterprovider) | supported | | * `readers`: supported
* `views`: supported
* `exemplar_filter`: supported
* `meter_configurator/development`: supported
| +| [`MetricProducer`](#metricproducer) | supported | | * `opencensus`: supported
| +| [`MetricReader`](#metricreader) | supported | | * `periodic`: supported
* `pull`: supported
| +| [`NameStringValuePair`](#namestringvaluepair) | supported | | * `name`: supported
* `value`: supported
| +| [`OpenCensusMetricProducer`](#opencensusmetricproducer) | supported | | | +| [`OpentelemetryConfiguration`](#opentelemetryconfiguration) | supported | | * `file_format`: supported
* `disabled`: supported
* `log_level`: supported
* `attribute_limits`: supported
* `logger_provider`: supported
* `meter_provider`: supported
* `propagator`: supported
* `tracer_provider`: supported
* `resource`: supported
* `instrumentation/development`: supported
| +| [`OpenTracingPropagator`](#opentracingpropagator) | supported | | | +| [`OtlpGrpcExporter`](#otlpgrpcexporter) | supported | | * `endpoint`: supported
* `headers`: supported
* `headers_list`: supported
* `compression`: supported
* `timeout`: supported
* `tls`: supported
| +| [`OtlpGrpcMetricExporter`](#otlpgrpcmetricexporter) | supported | | * `endpoint`: supported
* `headers`: supported
* `headers_list`: supported
* `compression`: supported
* `timeout`: supported
* `temporality_preference`: supported
* `default_histogram_aggregation`: supported
* `tls`: supported
| +| [`OtlpHttpEncoding`](#otlphttpencoding) | supported | | | +| [`OtlpHttpExporter`](#otlphttpexporter) | supported | | * `endpoint`: supported
* `headers`: supported
* `headers_list`: supported
* `compression`: supported
* `timeout`: supported
* `encoding`: supported
* `tls`: supported
| +| [`OtlpHttpMetricExporter`](#otlphttpmetricexporter) | supported | | * `endpoint`: supported
* `endpoint`: supported
* `headers`: supported
* `headers_list`: supported
* `compression`: supported
* `timeout`: supported
* `encoding`: supported
* `temporality_preference`: supported
* `default_histogram_aggregation`: supported
* `tls`: supported
| +| [`ParentBasedSampler`](#parentbasedsampler) | supported | | * `root`: supported
* `remote_parent_sampled`: supported
* `remote_parent_not_sampled`: supported
* `local_parent_sampled`: supported
* `local_parent_not_sampled`: supported
| +| [`PeriodicMetricReader`](#periodicmetricreader) | supported | | * `interval`: supported
* `timeout`: supported
* `exporter`: supported
* `producers`: supported
* `cardinality_limits`: supported
| +| [`Propagator`](#propagator) | supported | | * `composite`: supported
* `composite_list`: supported
| +| [`PullMetricExporter`](#pullmetricexporter) | supported | | * `prometheus/development`: supported
| +| [`PullMetricReader`](#pullmetricreader) | supported | | * `exporter`: supported
* `producers`: supported
* `cardinality_limits`: supported
| +| [`PushMetricExporter`](#pushmetricexporter) | supported | | * `otlp_http`: supported
* `otlp_grpc`: supported
* `otlp_file/development`: supported
* `console`: supported
| +| [`Resource`](#resource) | supported | | * `attributes`: supported
* `detection/development`: supported
* `schema_url`: supported
* `attributes_list`: supported
| +| [`Sampler`](#sampler) | supported | | * `always_off`: supported
* `always_on`: supported
* `jaeger_remote`: supported
* `parent_based`: supported
* `trace_id_ratio_based`: supported
| +| [`SimpleLogRecordProcessor`](#simplelogrecordprocessor) | supported | | * `exporter`: supported
| +| [`SimpleSpanProcessor`](#simplespanprocessor) | supported | | * `exporter`: supported
| +| [`SpanExporter`](#spanexporter) | supported | | * `otlp_http`: supported
* `otlp_grpc`: supported
* `otlp_file/development`: supported
* `console`: supported
* `zipkin`: supported
| +| [`SpanLimits`](#spanlimits) | supported | | * `attribute_value_length_limit`: supported
* `attribute_count_limit`: supported
* `event_count_limit`: supported
* `link_count_limit`: supported
* `event_attribute_count_limit`: supported
* `link_attribute_count_limit`: supported
| +| [`SpanProcessor`](#spanprocessor) | supported | | * `batch`: supported
* `simple`: supported
| +| [`SumAggregation`](#sumaggregation) | supported | | | +| [`TextMapPropagator`](#textmappropagator) | supported | | * `tracecontext`: supported
* `baggage`: supported
* `b3`: supported
* `b3multi`: supported
* `jaeger`: supported
* `ottrace`: supported
| +| [`TraceContextPropagator`](#tracecontextpropagator) | supported | | | +| [`TraceIdRatioBasedSampler`](#traceidratiobasedsampler) | supported | | * `ratio`: supported
| +| [`TracerProvider`](#tracerprovider) | supported | | * `processors`: supported
* `limits`: supported
* `sampler`: supported
* `tracer_configurator/development`: supported
| +| [`View`](#view) | supported | | * `selector`: supported
* `stream`: supported
| +| [`ViewSelector`](#viewselector) | supported | | * `instrument_name`: supported
* `instrument_type`: supported
* `unit`: supported
* `meter_name`: supported
* `meter_version`: supported
* `meter_schema_url`: supported
| +| [`ViewStream`](#viewstream) | supported | | * `name`: supported
* `description`: supported
* `aggregation`: supported
* `aggregation_cardinality_limit`: supported
* `attribute_keys`: supported
| +| [`ZipkinSpanExporter`](#zipkinspanexporter) | supported | | * `endpoint`: supported
* `timeout`: supported
| + + # 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. diff --git a/schema/meta_schema_language_java.yaml b/schema/meta_schema_language_java.yaml new file mode 100644 index 00000000..55c0db88 --- /dev/null +++ b/schema/meta_schema_language_java.yaml @@ -0,0 +1,374 @@ +latestSupportedFileFormat: 1.0.0-rc.1 +typeSupportStatuses: + - type: Aggregation + status: supported + notes: "" + propertyOverrides: [] + - type: AlwaysOffSampler + status: supported + notes: "" + propertyOverrides: [] + - type: AlwaysOnSampler + status: supported + notes: "" + propertyOverrides: [] + - type: AttributeLimits + status: supported + notes: "" + propertyOverrides: [] + - type: AttributeNameValue + status: supported + notes: "" + propertyOverrides: [] + - type: AttributeType + status: supported + notes: "" + propertyOverrides: [] + - type: B3MultiPropagator + status: supported + notes: "" + propertyOverrides: [] + - type: B3Propagator + status: supported + notes: "" + propertyOverrides: [] + - type: BaggagePropagator + status: supported + notes: "" + propertyOverrides: [] + - type: Base2ExponentialBucketHistogramAggregation + status: supported + notes: "" + propertyOverrides: + - property: record_min_max + status: ignored + - type: BatchLogRecordProcessor + status: supported + notes: "" + propertyOverrides: [] + - type: BatchSpanProcessor + status: supported + notes: "" + propertyOverrides: [] + - type: CardinalityLimits + status: supported + notes: "" + propertyOverrides: [] + - type: ConsoleExporter + status: supported + notes: "" + propertyOverrides: [] + - type: DefaultAggregation + status: supported + notes: "" + propertyOverrides: [] + - type: DropAggregation + status: supported + notes: "" + propertyOverrides: [] + - type: ExemplarFilter + status: supported + notes: "" + propertyOverrides: [] + - type: ExperimentalContainerResourceDetector + status: supported + notes: "" + propertyOverrides: [] + - type: ExperimentalGeneralInstrumentation + status: supported + notes: "" + propertyOverrides: [] + - type: ExperimentalHostResourceDetector + status: supported + notes: "" + propertyOverrides: [] + - type: ExperimentalHttpClientInstrumentation + status: supported + notes: "" + propertyOverrides: [] + - type: ExperimentalHttpInstrumentation + status: supported + notes: "" + propertyOverrides: [] + - type: ExperimentalHttpServerInstrumentation + status: supported + notes: "" + propertyOverrides: [] + - type: ExperimentalInstrumentation + status: supported + notes: "" + propertyOverrides: [] + - type: ExperimentalLanguageSpecificInstrumentation + status: supported + notes: "" + propertyOverrides: [] + - type: ExperimentalLoggerConfig + status: supported + notes: "" + propertyOverrides: [] + - type: ExperimentalLoggerConfigurator + status: supported + notes: "" + propertyOverrides: [] + - type: ExperimentalLoggerMatcherAndConfig + status: supported + notes: "" + propertyOverrides: [] + - type: ExperimentalMeterConfig + status: supported + notes: "" + propertyOverrides: [] + - type: ExperimentalMeterConfigurator + status: supported + notes: "" + propertyOverrides: [] + - type: ExperimentalMeterMatcherAndConfig + status: supported + notes: "" + propertyOverrides: [] + - type: ExperimentalOtlpFileExporter + status: supported + notes: "" + propertyOverrides: [] + - type: ExperimentalOtlpFileMetricExporter + status: supported + notes: "" + propertyOverrides: [] + - type: ExperimentalPeerInstrumentation + status: supported + notes: "" + propertyOverrides: [] + - type: ExperimentalPeerServiceMapping + status: supported + notes: "" + propertyOverrides: [] + - type: ExperimentalProcessResourceDetector + status: supported + notes: "" + propertyOverrides: [] + - type: ExperimentalPrometheusMetricExporter + status: supported + notes: "" + propertyOverrides: + - property: translation_strategy + status: not_implemented + - property: without_scope_info + status: ignored + - type: ExperimentalResourceDetection + status: supported + notes: "" + propertyOverrides: [] + - type: ExperimentalResourceDetector + status: supported + notes: "" + propertyOverrides: [] + - type: ExperimentalServiceResourceDetector + status: supported + notes: "" + propertyOverrides: [] + - type: ExperimentalTracerConfig + status: supported + notes: "" + propertyOverrides: [] + - type: ExperimentalTracerConfigurator + status: supported + notes: "" + propertyOverrides: [] + - type: ExperimentalTracerMatcherAndConfig + status: supported + notes: "" + propertyOverrides: [] + - type: ExplicitBucketHistogramAggregation + status: supported + notes: "" + propertyOverrides: [] + - type: ExporterDefaultHistogramAggregation + status: supported + notes: "" + propertyOverrides: [] + - type: ExporterTemporalityPreference + status: supported + notes: "" + propertyOverrides: [] + - type: GrpcTls + status: unknown + notes: "" + propertyOverrides: + - property: insecure + status: not_applicable + - type: HttpTls + status: unknown + notes: "" + propertyOverrides: [] + - type: IncludeExclude + status: supported + notes: "" + propertyOverrides: [] + - type: InstrumentType + status: supported + notes: "" + propertyOverrides: [] + - type: JaegerPropagator + status: supported + notes: "" + propertyOverrides: [] + - type: JaegerRemoteSampler + status: supported + notes: "" + propertyOverrides: [] + - type: LastValueAggregation + status: supported + notes: "" + propertyOverrides: [] + - type: LoggerProvider + status: supported + notes: "" + propertyOverrides: [] + - type: LogRecordExporter + status: supported + notes: "" + propertyOverrides: [] + - type: LogRecordLimits + status: supported + notes: "" + propertyOverrides: [] + - type: LogRecordProcessor + status: supported + notes: "" + propertyOverrides: [] + - type: MeterProvider + status: supported + notes: "" + propertyOverrides: [] + - type: MetricProducer + status: supported + notes: "" + propertyOverrides: [] + - type: MetricReader + status: supported + notes: "" + propertyOverrides: [] + - type: NameStringValuePair + status: supported + notes: "" + propertyOverrides: [] + - type: OpenCensusMetricProducer + status: supported + notes: "" + propertyOverrides: [] + - type: OpentelemetryConfiguration + status: supported + notes: "" + propertyOverrides: [] + - type: OpenTracingPropagator + status: supported + notes: "" + propertyOverrides: [] + - type: OtlpGrpcExporter + status: supported + notes: "" + propertyOverrides: [] + - type: OtlpGrpcMetricExporter + status: supported + notes: "" + propertyOverrides: [] + - type: OtlpHttpEncoding + status: supported + notes: "" + propertyOverrides: [] + - type: OtlpHttpExporter + status: supported + notes: "" + propertyOverrides: [] + - type: OtlpHttpMetricExporter + status: supported + notes: "" + propertyOverrides: [] + - type: ParentBasedSampler + status: supported + notes: "" + propertyOverrides: [] + - type: PeriodicMetricReader + status: supported + notes: "" + propertyOverrides: [] + - type: Propagator + status: supported + notes: "" + propertyOverrides: [] + - type: PullMetricExporter + status: supported + notes: "" + propertyOverrides: [] + - type: PullMetricReader + status: supported + notes: "" + propertyOverrides: [] + - type: PushMetricExporter + status: supported + notes: "" + propertyOverrides: [] + - type: Resource + status: supported + notes: "" + propertyOverrides: [] + - type: Sampler + status: supported + notes: "" + propertyOverrides: [] + - type: SimpleLogRecordProcessor + status: supported + notes: "" + propertyOverrides: [] + - type: SimpleSpanProcessor + status: supported + notes: "" + propertyOverrides: [] + - type: SpanExporter + status: supported + notes: "" + propertyOverrides: [] + - type: SpanLimits + status: supported + notes: "" + propertyOverrides: [] + - type: SpanProcessor + status: supported + notes: "" + propertyOverrides: [] + - type: SumAggregation + status: supported + notes: "" + propertyOverrides: [] + - type: TextMapPropagator + status: supported + notes: "" + propertyOverrides: [] + - type: TraceContextPropagator + status: supported + notes: "" + propertyOverrides: [] + - type: TraceIdRatioBasedSampler + status: supported + notes: "" + propertyOverrides: [] + - type: TracerProvider + status: supported + notes: "" + propertyOverrides: [] + - type: View + status: supported + notes: "" + propertyOverrides: [] + - type: ViewSelector + status: supported + notes: "" + propertyOverrides: [] + - type: ViewStream + status: supported + notes: "" + propertyOverrides: [] + - type: ZipkinSpanExporter + status: supported + notes: "" + propertyOverrides: [] diff --git a/schema/meta_schema.yaml b/schema/meta_schema_types.yaml similarity index 100% rename from schema/meta_schema.yaml rename to schema/meta_schema_types.yaml diff --git a/scripts/fix-meta-schema.js b/scripts/fix-meta-schema.js index e60be599..1d91f545 100644 --- a/scripts/fix-meta-schema.js +++ b/scripts/fix-meta-schema.js @@ -1,14 +1,10 @@ - import { - readAndFixMetaSchemaTypes, writeMetaSchemaTypes + readAndFixMetaSchema, writeMetaSchema } from "./meta-schema.js"; -const { messages, types } = readAndFixMetaSchemaTypes(); +const { messages, metaSchema } = readAndFixMetaSchema(); -// 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); +writeMetaSchema(metaSchema); // Write messages to console messages.forEach(message => { diff --git a/scripts/generate-descriptions.js b/scripts/generate-descriptions.js index 1170a8f1..a7a776ab 100644 --- a/scripts/generate-descriptions.js +++ b/scripts/generate-descriptions.js @@ -1,6 +1,6 @@ import fs from 'fs'; import yaml from 'yaml'; -import {readAndFixMetaSchemaTypes} from "./meta-schema.js"; +import {readAndFixMetaSchema} from "./meta-schema.js"; import {readJsonSchemaTypes} from "./json-schema.js"; // Extract input file arg or throw @@ -30,9 +30,9 @@ for (let i = 3; i < process.argv.length; i++) { } // Read JSON schema and meta schema -const { messages, types } = readAndFixMetaSchemaTypes(); +const { messages, metaSchema } = readAndFixMetaSchema(); const metaSchemaTypesByType = {}; -types.forEach(type => metaSchemaTypesByType[type.type] = type); +metaSchema.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."); } diff --git a/scripts/generate-markdown.js b/scripts/generate-markdown.js index aae1d420..5b17dc40 100644 --- a/scripts/generate-markdown.js +++ b/scripts/generate-markdown.js @@ -1,9 +1,9 @@ import {readJsonSchemaTypes} from "./json-schema.js"; -import {readAndFixMetaSchemaTypes} from "./meta-schema.js"; +import {KNOWN_LANGUAGES, readAndFixMetaSchema} from "./meta-schema.js"; import fs from "node:fs"; import {markdownDocPath} from "./util.js"; -const { messages, types } = readAndFixMetaSchemaTypes(); +const { messages, metaSchema } = readAndFixMetaSchema(); if (messages.length > 0) { throw new Error("Meta schema has problems. Please run fix-meta-schema and try again."); @@ -16,14 +16,14 @@ jsonSchemaTypes.forEach(type => jsonSchemaTypesByType[type.type] = type); const output = []; const headers = []; -types.sort((a, b) => a.type.localeCompare(b.type)); +metaSchema.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 => { +metaSchema.types.forEach(metaSchemaType => { const type = metaSchemaType.type; const jsonSchemaType = jsonSchemaTypesByType[type]; if (!jsonSchemaType) { @@ -62,7 +62,37 @@ types.forEach(metaSchemaType => { output.push(`| \`${property.property}\` | ${formattedPropertyType} | \`${isRequired}\` | ${formattedConstraints} | ${formattedDescription} |\n`); }); output.push('\n'); - // TODO: print language implementation status + + // Write language support status for type + output.push(`
\n`); + output.push('Language support status\n\n'); + const languageImplementationsByLanguage = {}; + metaSchema.languageImplementations.forEach(languageImplementation => languageImplementationsByLanguage[languageImplementation.language] = languageImplementation); + output.push('| Property |'); + KNOWN_LANGUAGES.forEach(language => { + output.push(` [${language}](#${language}) |`); + if (!languageImplementationsByLanguage[language]) { + throw new Error(`Meta schema LanguageImplementation not found for language ${language}.`); + } + }); + output.push('\n'); + output.push('|---|'); + KNOWN_LANGUAGES.forEach(language => output.push(`---|`)); + output.push('\n'); + metaSchemaType.properties.forEach(property => { + output.push(`| \`${property.property}\` |`); + KNOWN_LANGUAGES.forEach(language => { + const typeSupportStatus = languageImplementationsByLanguage[language].typeSupportStatuses.find(item => item.type === type); + if (!typeSupportStatus) { + throw new Error(`Meta schema LanguageImplementation for language ${language} missing type ${type}.`); + } + const propertyOverride = typeSupportStatus.propertyOverrides.find(propertyOverride => propertyOverride.property === property.property); + const status = propertyOverride ? propertyOverride.status : typeSupportStatus.status; + output.push(` ${status} |`); + }); + output.push('\n'); + }); + output.push(`
\n\n`) } // Constraints @@ -101,6 +131,36 @@ types.forEach(metaSchemaType => { output.push('\n'); }); +// Write language support status +addHeader('Language Support Status', 'language-support-status', 1); +KNOWN_LANGUAGES.forEach(language => { + addHeader(language, language, 2); + const languageImplementation = metaSchema.languageImplementations.find(item => item.language === language); + if (!languageImplementation) { + throw new Error(`Meta schema LanguageImplementation not found for language ${language}.`); + } + output.push(`Latest supported file format: \`${languageImplementation.latestSupportedFileFormat}\`\n\n`); + + output.push(`| Type | Status | Notes | Property Support Status |\n`); + output.push(`|---|---|---|---|\n`); + languageImplementation.typeSupportStatuses.forEach(typeSupportStatus => { + const metaSchemaType = metaSchema.types.find(item => item.type === typeSupportStatus.type); + if (!metaSchemaType) { + throw new Error(`MetaSchemaType not found for type ${typeSupportStatus.type}.`); + } + + const propertySupportStatus = []; + metaSchemaType.properties.forEach(metaSchemaProperty => { + const propertyOverride = typeSupportStatus.propertyOverrides.find(propertyOverride => propertyOverride.property === metaSchemaProperty.property); + const status = propertyOverride ? propertyOverride.status : typeSupportStatus.status; + propertySupportStatus.push(`* \`${metaSchemaProperty.property}\`: ${status}
`) ; + }); + + output.push(`| [\`${typeSupportStatus.type}\`](#${typeSupportStatus.type.toLowerCase()}) | ${typeSupportStatus.status} | ${typeSupportStatus.notes} | ${propertySupportStatus.join('')} |\n`); + }); + output.push(`\n\n`); +}); + // Write SDK extension plugins addHeader('SDK Extension Plugins', 'sdk-extension-plugins', 1); output.push( @@ -113,7 +173,7 @@ Each of the following types support referencing custom interface implementations 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) +metaSchema.types.filter(metaSchemaType => metaSchemaType.isSdkExtensionPlugin) .forEach(metaSchemaType => { output.push(`* [${metaSchemaType.type}](#${metaSchemaType.type})\n`) }); diff --git a/scripts/meta-schema.js b/scripts/meta-schema.js index e2c44924..39beb3d6 100644 --- a/scripts/meta-schema.js +++ b/scripts/meta-schema.js @@ -1,66 +1,247 @@ - -import { readJsonSchemaTypes } from "./json-schema.js"; +import {readJsonSchemaTypes} from "./json-schema.js"; import fs from 'fs'; import yaml from 'yaml'; -import {metaSchemaFileName, metaSchemaPath} from "./util.js"; +import { + metaSchemaTypesFileName, + metaSchemaLanguageStatusPath, + metaSchemaTypesPath, + metaSchemaLanguageStatusFileName, + schemaDirPath, + metaSchemaLanguageFilePrefix +} from "./util.js"; + +export const KNOWN_LANGUAGES = ['java']; + +const IMPLEMENTATION_STATUS_UNKNOWN = 'unknown'; +const IMPLEMENTATION_STATUSES = ['supported', IMPLEMENTATION_STATUS_UNKNOWN, 'not_implemented', 'ignored', 'not_applicable'] -export function writeMetaSchemaTypes(metaSchemaTypes) { - fs.writeFileSync(metaSchemaPath, yaml.stringify(metaSchemaTypes, { lineWidth: 0 })); +export function writeMetaSchema(metaSchema) { + fs.writeFileSync(metaSchemaTypesPath, yaml.stringify(metaSchema.types.map(type => type.toJson()), {lineWidth: 0})); + + metaSchema.languageImplementations.forEach(languageImplementation => { + fs.writeFileSync(metaSchemaLanguageStatusPath(languageImplementation.language), yaml.stringify(languageImplementation.toJson(), {lineWidth: 0})); + }); } -export function readAndFixMetaSchemaTypes() { +export function readAndFixMetaSchema() { // 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 = []; + // Parse meta schema types and sanitize + const metaSchemaTypesContent = fs.readFileSync(metaSchemaTypesPath, "utf-8"); + const metaSchemaTypesDoc = yaml.parse(metaSchemaTypesContent); + const metaSchemaTypes = parseArrayValue( + metaSchemaTypesDoc, + entryJson => MetaSchemaType.parseJson(entryJson, messages), + `${metaSchemaTypesFileName} is invalid`, + error => `${metaSchemaTypesFileName} has invalid MetaSchemaType: ${error.message}. Skipping.`, + messages); - if (Array.isArray(metaSchemaDoc)) { - metaSchemaDoc.forEach(rawMetaSchemaType => { - const type = rawMetaSchemaType['type']; + // Parse meta schema language implementations and sanitize + const metaSchemaLanguageImplementations = []; + KNOWN_LANGUAGES.forEach(language => { + let metaSchemaLanguageStatusContent; + try { + metaSchemaLanguageStatusContent = fs.readFileSync(metaSchemaLanguageStatusPath(language), "utf-8"); + } catch (error) { + messages.push(`Error reading ${metaSchemaLanguageStatusFileName(language)}: ${error.message}. Skipping.`); + return; + } + const metaSchemaLanguageStatusDoc = yaml.parse(metaSchemaLanguageStatusContent); + const languageImplementation = LanguageImplementation.parseJson(language, metaSchemaLanguageStatusDoc, messages); + metaSchemaLanguageImplementations.push(languageImplementation); + }); - if (typeof type !== 'string') { - messages.push(`${metaSchemaFileName} contains entry ${JSON.stringify(rawMetaSchemaType)} with invalid type. Ignoring type.`); - return; - } + // Create full MetaSchema from meta schema types and language implementations + let metaSchema = new MetaSchema(metaSchemaTypes, metaSchemaLanguageImplementations); - 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.`); - } + const jsonSchemaTypesByType = {}; + readJsonSchemaTypes().forEach(type => jsonSchemaTypesByType[type.type] = type); - metaSchemaTypes.push(new MetaSchemaType(type, metaSchemaProperties, isSdkExtensionPlugin)); - }); - } else { - messages.push(`${metaSchemaFileName} must be array of types.`); + // Reconcile meta schema with json schema + reconcileTypes(metaSchema, jsonSchemaTypesByType, messages); + reconcileLanguageImplementations(metaSchema, jsonSchemaTypesByType, messages); + + return {messages, metaSchema}; +} + +// Types + +export class MetaSchema { + types; + languageImplementations; + + constructor(types, languageImplementations) { + this.types = types; + this.languageImplementations = languageImplementations; } - const metaSchemaTypesByType = {}; - metaSchemaTypes.forEach(type => metaSchemaTypesByType[type.type] = type); + toJson() { + let sortedTypes = this.types.map(type => type.toJson()); + sortedTypes.sort((a, b) => a.type.localeCompare(b.type)); - const jsonSchemaTypesByType = {}; - readJsonSchemaTypes().forEach(type => jsonSchemaTypesByType[type.type] = type); + let sortedLanguageImplementations = this.languageImplementations.map(languageImplementation => languageImplementation.toJson()); + sortedLanguageImplementations.sort((a, b) => a.language.localeCompare(b.language)); + + return {types: sortedTypes, languageImplementations: sortedLanguageImplementations}; + } +} + +export class MetaSchemaType { + type; + properties; + isSdkExtensionPlugin; + + 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}; + } + + static parseJson(rawJson, messages) { + const type = parseString(rawJson, 'type', `MetaSchemaType has invalid 'type'`); + const properties = parseArray( + rawJson, + 'properties', + entryJson => MetaSchemaProperty.parseJson(entryJson, messages), + `MetaSchemaType '${type}' has invalid 'properties'`, + error => `MetaSchemaType '${type}' has invalid property: ${error.message}. Skipping.`, + messages); + const isSdkExtensionPlugin = parseBoolean(rawJson, 'isSdkExtensionPlugin', `MetaSchemaType has invalid 'isSdkExtensionPlugin'`); + return new MetaSchemaType(type, properties, isSdkExtensionPlugin); + } +} + +export class MetaSchemaProperty { + property; + description; + + constructor(property, description) { + this.property = property; + this.description = description; + } + + toJson() { + return {property: this.property, description: this.description}; + } + + static parseJson(rawJson, messages) { + const property = parseString(rawJson, 'property', `MetaSchemaProperty has invalid 'property'`); + const description = parseString(rawJson, 'description', `MetaSchemaProperty has invalid 'description'`); + return new MetaSchemaProperty(property, description); + } +} + +export class LanguageImplementation { + language; + latestSupportedFileFormat; + typeSupportStatuses; + + constructor(language, latestSupportedFileFormat, typeSupportStatuses) { + this.language = language; + this.latestSupportedFileFormat = latestSupportedFileFormat; + this.typeSupportStatuses = typeSupportStatuses; + } + + toJson() { + const typeSupportStatuses = this.typeSupportStatuses.map(typeSupportStatus => typeSupportStatus.toJson()); + typeSupportStatuses.sort((a, b) => a.type.localeCompare(b.type)); + + return { + latestSupportedFileFormat: this.latestSupportedFileFormat, + typeSupportStatuses + }; + } + + static parseJson(language, rawJson, messages) { + const latestSupportedFileFormat = parseString(rawJson, 'latestSupportedFileFormat', `LanguageImplementation has invalid 'latestSupportedFileFormat'`); + const typeSupportStatuses = parseArray( + rawJson, + 'typeSupportStatuses', + entryJson => TypeSupportStatus.parseJson(entryJson, messages), + `LanguageImplementation '${language}' has invalid 'typeSupportStatuses'`, + error => `LanguageImplementation '${language}' has invalid TypeSupportStatus: ${error.message}. Skipping.`, + messages); + return new LanguageImplementation(language, latestSupportedFileFormat, typeSupportStatuses); + } +} + +export class TypeSupportStatus { + type; + status; + propertyOverrides; + notes; + + constructor(type, status, propertyOverrides, notes) { + this.type = type; + this.status = status; + this.propertyOverrides = propertyOverrides; + this.notes = notes; + } + + toJson() { + const propertyOverrides = this.propertyOverrides.map(propertyStatus => propertyStatus.toJson()); + propertyOverrides.sort((a, b) => a.property.localeCompare(b.property)); + + return { + type: this.type, + status: this.status, + notes: this.notes, + propertyOverrides + }; + } + + static parseJson(rawJson, messages) { + const type = parseString(rawJson, 'type', `TypeSupportStatus has invalid 'type'`); + const status = parseEnum(rawJson, 'status', `TypeSupportStatus has invalid 'status'`, IMPLEMENTATION_STATUSES); + const propertyOverrides = parseArray( + rawJson, + 'propertyOverrides', + entryJson => PropertyStatus.parseJson(entryJson, messages), + `TypeSupportStatus '${type}' has invalid 'propertyOverrides'`, + error => `TypeSupportStatus '${type}' has invalid PropertyStatus: ${error.message}. Skipping.`, + messages) + const notes = parseString(rawJson, 'notes', `TypeSupportStatus has invalid 'notes'`); + return new TypeSupportStatus(type, status, propertyOverrides, notes); + } +} + +export class PropertyStatus { + property; + status; + + constructor(property, status) { + this.property = property; + this.status = status; + } + + toJson() { + return { + property: this.property, + status: this.status + }; + } + + static parseJson(rawJson, messages) { + const property = parseString(rawJson, 'property', `PropertyStatus has invalid 'property'`); + const status = parseEnum(rawJson, 'status', `PropertyStatus has invalid 'status'`, IMPLEMENTATION_STATUSES); + return new PropertyStatus(property, status); + } +} + +// Helper functions + +function reconcileTypes(metaSchema, jsonSchemaTypesByType, messages) { + const metaSchemaTypesByType = {}; + metaSchema.types.forEach(type => metaSchemaTypesByType[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]) => { @@ -100,7 +281,7 @@ export function readAndFixMetaSchemaTypes() { // 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.`); + messages.push(`Type ${type} found in ${metaSchemaTypesFileName} but not in JSON schema. Removing.`); delete metaSchemaTypesByType[type]; } }); @@ -108,46 +289,126 @@ export function readAndFixMetaSchemaTypes() { // 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.`); + messages.push(`Type ${type} in ${jsonSchemaType.file} and path ${jsonSchemaType.jsonSchemaPath} is missing from ${metaSchemaTypesFileName}. Adding.`); const metaSchemaType = jsonSchemaType.toMetaSchemaType(); metaSchemaTypesByType[metaSchemaType.type] = metaSchemaType; } }); - return { messages, types: Object.values(metaSchemaTypesByType) }; + metaSchema.types = Object.values(metaSchemaTypesByType); } -export class MetaSchemaProperty { - property; - description; +function reconcileLanguageImplementations(metaSchema, jsonSchemaTypesByType, messages) { + const languageImplementationsByLanguage = {}; + metaSchema.languageImplementations.forEach(languageImplementation => languageImplementationsByLanguage[languageImplementation.language] = languageImplementation); - constructor(property, description) { - this.property = property; - this.description = description; - } + // Find any types in both json schema and meta schema and make sure all json schema properties match + Object.entries(languageImplementationsByLanguage).forEach(([language, languageImplementation]) => { + if (!KNOWN_LANGUAGES.includes(language)) { + return; + } + const reconciledTypeSupportStatuses = []; + const expectedTypeSupportStatuses = emptyLanguageImplementation(language, metaSchema).typeSupportStatuses; - toJson() { - return { property: this.property, description: this.description }; - } + // Remove extra types + languageImplementation.typeSupportStatuses.forEach(typeSupportStatus => { + const jsonSchemaType = jsonSchemaTypesByType[typeSupportStatus.type]; + if (!jsonSchemaType) { + messages.push(`LanguageImplementation ${language} has type ${typeSupportStatus.type} in meta schema and not in JSON schema. Removing.`); + return; + } + // Remove any propertyOverrides which occur in meta schema but not json schema + const reconciledPropertyOverrides = []; + typeSupportStatus.propertyOverrides.forEach(propertyStatus => { + if (!jsonSchemaType.properties.find(jsonSchemaProperty => jsonSchemaProperty.property === propertyStatus.property)) { + messages.push(`LanguageImplementation ${language} type ${typeSupportStatus.type} has propertyOverride ${propertyStatus.property} in meta schema and not in JSON schema. Removing.`); + return; + } + reconciledPropertyOverrides.push(propertyStatus); + }); + typeSupportStatus.propertyOverrides = reconciledPropertyOverrides; + reconciledTypeSupportStatuses.push(typeSupportStatus); + }); + + // Add missing types + expectedTypeSupportStatuses.forEach(typeSupportStatus => { + if (!reconciledTypeSupportStatuses.find(item => item.type === typeSupportStatus.type)) { + messages.push(`LanguageImplementation ${language} is missing type ${typeSupportStatus.type} in meta schema. Adding.`); + reconciledTypeSupportStatuses.push(typeSupportStatus); + } + }); + + languageImplementation.typeSupportStatuses = reconciledTypeSupportStatuses; + }); + + // Find and remove any language implementations which are extra + fs.readdirSync(schemaDirPath) + .filter(file => file.startsWith(metaSchemaLanguageFilePrefix)) + .filter(file => !KNOWN_LANGUAGES.some(language => metaSchemaLanguageStatusFileName(language) === file)) + .forEach(file => { + messages.push(`LanguageImplementation file ${file} found for unrecognized language. Removing.`); + fs.unlinkSync(schemaDirPath + file); + }); + + // Find and add any language implementations not in meta schema + KNOWN_LANGUAGES.forEach(language => { + const languageImplementation = languageImplementationsByLanguage[language]; + if (!languageImplementation) { + messages.push(`LanguageImplementation ${language} not found. Adding.`); + languageImplementationsByLanguage[language] = emptyLanguageImplementation(language, metaSchema); + } + }); + + metaSchema.languageImplementations = Object.values(languageImplementationsByLanguage); } -export class MetaSchemaType { - type; - properties; - isSdkExtensionPlugin; - // TODO: track language implementation status +function emptyLanguageImplementation(language, metaSchema) { + return new LanguageImplementation( + language, + 'TODO', + metaSchema.types.map(metaSchemaType => new TypeSupportStatus(metaSchemaType.type, IMPLEMENTATION_STATUS_UNKNOWN, [], ''))); +} - constructor(type, properties, isSdkExtensionPlugin) { - this.type = type; - this.properties = properties; - this.isSdkExtensionPlugin = isSdkExtensionPlugin; +function parseEnum(rawJson, propertyName, errorMessage, knownValues) { + const string = parseString(rawJson, propertyName, errorMessage); + if (!IMPLEMENTATION_STATUSES.includes(string)) { + throw new Error(errorMessage); + } + return string; +} + +function parseString(rawJson, propertyName, errorMessage) { + const property = rawJson[propertyName]; + if (typeof property !== 'string') { + throw new Error(errorMessage); + } + return property; +} +function parseBoolean(rawJson, propertyName, errorMessage) { + const property = rawJson[propertyName]; + if (typeof property !== 'boolean') { + throw new Error(errorMessage); } + return property; +} - toJson() { - const properties = this.properties.map(property => property.toJson()); - properties.sort((a, b) => a.property.localeCompare(b.property)); +function parseArray(rawJson, propertyName, entryParser, errorMessage, entryErrorFormatter, messages) { + const property = rawJson[propertyName]; + return parseArrayValue(property, entryParser, errorMessage, entryErrorFormatter, messages); +} - return { type: this.type, properties: this.properties, isSdkExtensionPlugin: this.isSdkExtensionPlugin }; +function parseArrayValue(arrayValue, entryParser, errorMessage, entryErrorFormatter, messages) { + if (!Array.isArray(arrayValue)) { + throw new Error(errorMessage); } + const entries = []; + arrayValue.forEach(entry => { + try { + entries.push(entryParser(entry)); + } catch (error) { + messages.push(entryErrorFormatter(error)); + } + }); + return entries; } diff --git a/scripts/util.js b/scripts/util.js index 738c7869..31024622 100644 --- a/scripts/util.js +++ b/scripts/util.js @@ -4,7 +4,13 @@ import { fileURLToPath } from 'url'; const __filename = fileURLToPath(import.meta.url); const __dirname = path.dirname(__filename); -export const metaSchemaFileName = "meta_schema.yaml"; +export const metaSchemaFilePrefix = "meta_schema"; export const schemaDirPath = __dirname + "/../schema/"; -export const metaSchemaPath = schemaDirPath + metaSchemaFileName; export const markdownDocPath = __dirname + "/../schema-docs.md"; + +export const metaSchemaTypesFileName = `${metaSchemaFilePrefix}_types.yaml`; +export const metaSchemaTypesPath = schemaDirPath + metaSchemaTypesFileName; + +export const metaSchemaLanguageFilePrefix = `${metaSchemaFilePrefix}_language`; +export const metaSchemaLanguageStatusFileName = (language) => `${metaSchemaLanguageFilePrefix}_${language}.yaml`; +export const metaSchemaLanguageStatusPath = (language) => schemaDirPath + metaSchemaLanguageStatusFileName(language);