diff --git a/schema-docs.md b/schema-docs.md index 25cf39d7..d2c140a8 100644 --- a/schema-docs.md +++ b/schema-docs.md @@ -2037,19 +2037,22 @@ Usages: "$ref": "common.json#/$defs/IncludeExclude" }, "translation_strategy": { - "type": [ - "string", - "null" - ], - "enum": [ - "UnderscoreEscapingWithSuffixes", - "UnderscoreEscapingWithoutSuffixes", - "NoUTF8EscapingWithSuffixes", - "NoTranslation" - ] + "$ref": "#/$defs/ExperimentalPrometheusTranslationStrategy" } } }, + "ExperimentalPrometheusTranslationStrategy": { + "type": [ + "string", + "null" + ], + "enum": [ + "UnderscoreEscapingWithSuffixes", + "UnderscoreEscapingWithoutSuffixes", + "NoUTF8EscapingWithSuffixes", + "NoTranslation" + ] + }, "MetricReader": { "type": "object", "additionalProperties": false, @@ -6508,7 +6511,7 @@ Usages: |---|---|---|---|---| | `host` | one of:
* `string`
* `null`
| `false` | No constraints. | Configure host.
If omitted or null, localhost is used.
| | `port` | one of:
* `integer`
* `null`
| `false` | No constraints. | Configure port.
If omitted or null, 9464 is used.
| -| `translation_strategy` | one of:
* `string`
* `null`
| `false` | No constraints. | 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.
| +| `translation_strategy` | [`ExperimentalPrometheusTranslationStrategy`](#experimentalprometheustranslationstrategy) | `false` | No constraints. | 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.
| | `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. | | `without_scope_info` | one of:
* `boolean`
* `null`
| `false` | No constraints. | Configure Prometheus Exporter to produce metrics without a scope info metric.
If omitted or null, false is used.
| | `without_target_info` | one of:
* `boolean`
* `null`
| `false` | No constraints. | Configure Prometheus Exporter to produce metrics without a target info metric for the resource.
If omitted or null, false is used.
| @@ -6573,21 +6576,61 @@ Usages: "$ref": "common.json#/$defs/IncludeExclude" }, "translation_strategy": { - "type": [ - "string", - "null" - ], - "enum": [ - "UnderscoreEscapingWithSuffixes", - "UnderscoreEscapingWithoutSuffixes", - "NoUTF8EscapingWithSuffixes", - "NoTranslation" - ] + "$ref": "#/$defs/ExperimentalPrometheusTranslationStrategy" } } } +## ExperimentalPrometheusTranslationStrategy + +> [!WARNING] +> This type is [experimental](README.md#experimental-features). + +This is a enum type. + +| Value | Description | +|---|---| +| `NoTranslation` | Special character escaping is disabled. Type and unit suffixes are disabled. Metric names are unaltered. | +| `NoUTF8EscapingWithSuffixes` | Special character escaping is disabled. Type and unit suffixes are enabled. | +| `UnderscoreEscapingWithoutSuffixes` | Special character escaping is enabled. Type and unit suffixes are disabled. This represents classic Prometheus metric name compatibility. | +| `UnderscoreEscapingWithSuffixes` | Special character escaping is enabled. Type and unit suffixes are enabled. | + +
+Language support status + +| Value | [cpp](#cpp) | [go](#go) | [java](#java) | [js](#js) | +|---|---|---|---|---| +| `NoTranslation` | unknown | unknown | unknown | unknown | +| `NoUTF8EscapingWithSuffixes` | unknown | unknown | unknown | unknown | +| `UnderscoreEscapingWithoutSuffixes` | unknown | unknown | unknown | unknown | +| `UnderscoreEscapingWithSuffixes` | unknown | unknown | unknown | unknown | +
+ +No constraints. + +Usages: + +* [`ExperimentalPrometheusMetricExporter.translation_strategy`](#experimentalprometheusmetricexporter) + +
+JSON Schema + +[JSON Schema Source File](./schema/meter_provider.json) +
{
+  "type": [
+    "string",
+    "null"
+  ],
+  "enum": [
+    "UnderscoreEscapingWithSuffixes",
+    "UnderscoreEscapingWithoutSuffixes",
+    "NoUTF8EscapingWithSuffixes",
+    "NoTranslation"
+  ]
+}
+
+ ## ExperimentalResourceDetection > [!WARNING] @@ -7090,6 +7133,7 @@ Latest supported file format: `1.0.0-rc.2` | [`ExperimentalProbabilitySampler`](#experimentalprobabilitysampler) | not_implemented | | * `ratio`: not_implemented
| | [`ExperimentalProcessResourceDetector`](#experimentalprocessresourcedetector) | not_implemented | | | | [`ExperimentalPrometheusMetricExporter`](#experimentalprometheusmetricexporter) | supported | | * `host`: supported
* `port`: supported
* `translation_strategy`: supported
* `with_resource_constant_labels`: supported
* `without_scope_info`: unknown
* `without_target_info`: unknown
| +| [`ExperimentalPrometheusTranslationStrategy`](#experimentalprometheustranslationstrategy) | unknown | | * `NoTranslation`: unknown
* `NoUTF8EscapingWithSuffixes`: unknown
* `UnderscoreEscapingWithoutSuffixes`: unknown
* `UnderscoreEscapingWithSuffixes`: unknown
| | [`ExperimentalResourceDetection`](#experimentalresourcedetection) | not_implemented | | * `attributes`: not_implemented
* `detectors`: not_implemented
| | [`ExperimentalResourceDetector`](#experimentalresourcedetector) | not_implemented | | * `container`: not_implemented
* `host`: not_implemented
* `process`: not_implemented
* `service`: not_implemented
| | [`ExperimentalServiceResourceDetector`](#experimentalserviceresourcedetector) | not_implemented | | | @@ -7197,6 +7241,7 @@ Latest supported file format: `0.3.0` | [`ExperimentalProbabilitySampler`](#experimentalprobabilitysampler) | unknown | | * `ratio`: unknown
| | [`ExperimentalProcessResourceDetector`](#experimentalprocessresourcedetector) | unknown | | | | [`ExperimentalPrometheusMetricExporter`](#experimentalprometheusmetricexporter) | unknown | | * `host`: unknown
* `port`: unknown
* `translation_strategy`: unknown
* `with_resource_constant_labels`: unknown
* `without_scope_info`: unknown
* `without_target_info`: unknown
| +| [`ExperimentalPrometheusTranslationStrategy`](#experimentalprometheustranslationstrategy) | unknown | | * `NoTranslation`: unknown
* `NoUTF8EscapingWithSuffixes`: unknown
* `UnderscoreEscapingWithoutSuffixes`: unknown
* `UnderscoreEscapingWithSuffixes`: unknown
| | [`ExperimentalResourceDetection`](#experimentalresourcedetection) | unknown | | * `attributes`: unknown
* `detectors`: unknown
| | [`ExperimentalResourceDetector`](#experimentalresourcedetector) | unknown | | * `container`: unknown
* `host`: unknown
* `process`: unknown
* `service`: unknown
| | [`ExperimentalServiceResourceDetector`](#experimentalserviceresourcedetector) | unknown | | | @@ -7304,6 +7349,7 @@ Latest supported file format: `1.0.0-rc.1` | [`ExperimentalProbabilitySampler`](#experimentalprobabilitysampler) | ignored | | * `ratio`: ignored
| | [`ExperimentalProcessResourceDetector`](#experimentalprocessresourcedetector) | supported | | | | [`ExperimentalPrometheusMetricExporter`](#experimentalprometheusmetricexporter) | supported | | * `host`: supported
* `port`: supported
* `translation_strategy`: not_implemented
* `with_resource_constant_labels`: supported
* `without_scope_info`: ignored
* `without_target_info`: ignored
| +| [`ExperimentalPrometheusTranslationStrategy`](#experimentalprometheustranslationstrategy) | unknown | | * `NoTranslation`: unknown
* `NoUTF8EscapingWithSuffixes`: unknown
* `UnderscoreEscapingWithoutSuffixes`: unknown
* `UnderscoreEscapingWithSuffixes`: unknown
| | [`ExperimentalResourceDetection`](#experimentalresourcedetection) | supported | | * `attributes`: supported
* `detectors`: supported
| | [`ExperimentalResourceDetector`](#experimentalresourcedetector) | supported | | * `container`: supported
* `host`: supported
* `process`: supported
* `service`: supported
| | [`ExperimentalServiceResourceDetector`](#experimentalserviceresourcedetector) | supported | | | @@ -7411,6 +7457,7 @@ Latest supported file format: `1.0.0-rc.2` | [`ExperimentalProbabilitySampler`](#experimentalprobabilitysampler) | unknown | | * `ratio`: unknown
| | [`ExperimentalProcessResourceDetector`](#experimentalprocessresourcedetector) | unknown | | | | [`ExperimentalPrometheusMetricExporter`](#experimentalprometheusmetricexporter) | unknown | | * `host`: unknown
* `port`: unknown
* `translation_strategy`: unknown
* `with_resource_constant_labels`: unknown
* `without_scope_info`: unknown
* `without_target_info`: unknown
| +| [`ExperimentalPrometheusTranslationStrategy`](#experimentalprometheustranslationstrategy) | unknown | | * `NoTranslation`: unknown
* `NoUTF8EscapingWithSuffixes`: unknown
* `UnderscoreEscapingWithoutSuffixes`: unknown
* `UnderscoreEscapingWithSuffixes`: unknown
| | [`ExperimentalResourceDetection`](#experimentalresourcedetection) | unknown | | * `attributes`: unknown
* `detectors`: unknown
| | [`ExperimentalResourceDetector`](#experimentalresourcedetector) | unknown | | * `container`: unknown
* `host`: unknown
* `process`: unknown
* `service`: unknown
| | [`ExperimentalServiceResourceDetector`](#experimentalserviceresourcedetector) | unknown | | | diff --git a/schema/meta_schema_language_cpp.yaml b/schema/meta_schema_language_cpp.yaml index d45a0a01..949d52c4 100644 --- a/schema/meta_schema_language_cpp.yaml +++ b/schema/meta_schema_language_cpp.yaml @@ -280,6 +280,9 @@ typeSupportStatuses: status: unknown - property: without_target_info status: unknown + - type: ExperimentalPrometheusTranslationStrategy + status: unknown + enumOverrides: [] - type: ExperimentalResourceDetection status: not_implemented propertyOverrides: [] diff --git a/schema/meta_schema_language_go.yaml b/schema/meta_schema_language_go.yaml index 20cae541..d33e0d4b 100644 --- a/schema/meta_schema_language_go.yaml +++ b/schema/meta_schema_language_go.yaml @@ -276,6 +276,9 @@ typeSupportStatuses: - type: ExperimentalPrometheusMetricExporter status: unknown propertyOverrides: [] + - type: ExperimentalPrometheusTranslationStrategy + status: unknown + enumOverrides: [] - type: ExperimentalResourceDetection status: unknown propertyOverrides: [] diff --git a/schema/meta_schema_language_java.yaml b/schema/meta_schema_language_java.yaml index 223c783e..39bedc87 100644 --- a/schema/meta_schema_language_java.yaml +++ b/schema/meta_schema_language_java.yaml @@ -344,6 +344,9 @@ typeSupportStatuses: status: ignored - property: without_target_info status: ignored + - type: ExperimentalPrometheusTranslationStrategy + status: unknown + enumOverrides: [] - type: ExperimentalResourceDetection status: supported propertyOverrides: [] diff --git a/schema/meta_schema_language_js.yaml b/schema/meta_schema_language_js.yaml index 4dfef586..03e18f57 100644 --- a/schema/meta_schema_language_js.yaml +++ b/schema/meta_schema_language_js.yaml @@ -276,6 +276,9 @@ typeSupportStatuses: - type: ExperimentalPrometheusMetricExporter status: unknown propertyOverrides: [] + - type: ExperimentalPrometheusTranslationStrategy + status: unknown + enumOverrides: [] - type: ExperimentalResourceDetection status: unknown propertyOverrides: [] diff --git a/schema/meta_schema_types.yaml b/schema/meta_schema_types.yaml index f4020230..e4df95e6 100644 --- a/schema/meta_schema_types.yaml +++ b/schema/meta_schema_types.yaml @@ -1166,6 +1166,17 @@ Configure Prometheus Exporter to produce metrics without a target info metric for the resource. If omitted or null, false is used. isSdkExtensionPlugin: false +- type: ExperimentalPrometheusTranslationStrategy + enumValues: + - enumValue: NoTranslation + description: Special character escaping is disabled. Type and unit suffixes are disabled. Metric names are unaltered. + - enumValue: NoUTF8EscapingWithSuffixes + description: Special character escaping is disabled. Type and unit suffixes are enabled. + - enumValue: UnderscoreEscapingWithoutSuffixes + description: Special character escaping is enabled. Type and unit suffixes are disabled. This represents classic Prometheus metric name compatibility. + - enumValue: UnderscoreEscapingWithSuffixes + description: Special character escaping is enabled. Type and unit suffixes are enabled. + isSdkExtensionPlugin: false - type: ExperimentalResourceDetection properties: - property: attributes diff --git a/schema/meter_provider.json b/schema/meter_provider.json index 74c97bcf..82a4dc1e 100644 --- a/schema/meter_provider.json +++ b/schema/meter_provider.json @@ -199,16 +199,19 @@ "$ref": "common.json#/$defs/IncludeExclude" }, "translation_strategy": { - "type": ["string", "null"], - "enum": [ - "UnderscoreEscapingWithSuffixes", - "UnderscoreEscapingWithoutSuffixes", - "NoUTF8EscapingWithSuffixes", - "NoTranslation" - ] + "$ref": "#/$defs/ExperimentalPrometheusTranslationStrategy" } } }, + "ExperimentalPrometheusTranslationStrategy": { + "type": ["string", "null"], + "enum": [ + "UnderscoreEscapingWithSuffixes", + "UnderscoreEscapingWithoutSuffixes", + "NoUTF8EscapingWithSuffixes", + "NoTranslation" + ] + }, "MetricReader": { "type": "object", "additionalProperties": false,