diff --git a/CHANGELOG.md b/CHANGELOG.md index 1372a309..6dbb7195 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,8 @@ * **BREAKING**: Move certificate configuration under `tls` block ([#331](https://github.com/open-telemetry/opentelemetry-configuration/pull/331)) +* Add `without_target_info` to PrometheusMetricExporter + ([#331](https://github.com/open-telemetry/opentelemetry-configuration/pull/376)) ## [v1.0.0-rc.2] - 2025-09-26 diff --git a/examples/kitchen-sink.yaml b/examples/kitchen-sink.yaml index a7dd4c40..8d323245 100644 --- a/examples/kitchen-sink.yaml +++ b/examples/kitchen-sink.yaml @@ -224,6 +224,9 @@ meter_provider: # Configure Prometheus Exporter to produce metrics without a scope info metric. # If omitted or null, false is used. without_scope_info: false + # Configure Prometheus Exporter to produce metrics without a target info metric for the resource. + # If omitted or null, false is used. + without_target_info: false # Configure Prometheus Exporter to add resource attributes as metrics attributes, where the resource attribute keys match the patterns. with_resource_constant_labels: # Configure list of value patterns to include. diff --git a/schema-docs.md b/schema-docs.md index 4ef4491e..4387b3ce 100644 --- a/schema-docs.md +++ b/schema-docs.md @@ -2261,6 +2261,7 @@ Usages: | `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.
| | `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.
|
Language support status @@ -2271,7 +2272,8 @@ Usages: | `port` | supported | unknown | supported | unknown | | `translation_strategy` | supported | unknown | not_implemented | unknown | | `with_resource_constant_labels` | supported | unknown | supported | unknown | -| `without_scope_info` | supported | unknown | ignored | unknown | +| `without_scope_info` | unknown | unknown | ignored | unknown | +| `without_target_info` | unknown | unknown | ignored | unknown |
Constraints: @@ -2311,6 +2313,12 @@ Usages: "null" ] }, + "without_target_info": { + "type": [ + "boolean", + "null" + ] + }, "with_resource_constant_labels": { "$ref": "common.json#/$defs/IncludeExclude" }, @@ -3877,6 +3885,12 @@ Usages: "null" ] }, + "without_target_info": { + "type": [ + "boolean", + "null" + ] + }, "with_resource_constant_labels": { "$ref": "common.json#/$defs/IncludeExclude" }, @@ -7025,7 +7039,7 @@ Latest supported file format: `1.0.0-rc.2` | [`ExperimentalPeerServiceMapping`](#experimentalpeerservicemapping) | not_implemented | | * `peer`: not_implemented
* `service`: not_implemented
| | [`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`: supported
| +| [`ExperimentalPrometheusMetricExporter`](#experimentalprometheusmetricexporter) | supported | | * `host`: supported
* `port`: supported
* `translation_strategy`: supported
* `with_resource_constant_labels`: supported
* `without_scope_info`: unknown
* `without_target_info`: 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 | | | @@ -7132,7 +7146,7 @@ Latest supported file format: `0.3.0` | [`ExperimentalPeerServiceMapping`](#experimentalpeerservicemapping) | unknown | | * `peer`: unknown
* `service`: unknown
| | [`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
| +| [`ExperimentalPrometheusMetricExporter`](#experimentalprometheusmetricexporter) | unknown | | * `host`: unknown
* `port`: unknown
* `translation_strategy`: unknown
* `with_resource_constant_labels`: unknown
* `without_scope_info`: unknown
* `without_target_info`: unknown
| | [`ExperimentalResourceDetection`](#experimentalresourcedetection) | unknown | | * `attributes`: unknown
* `detectors`: unknown
| | [`ExperimentalResourceDetector`](#experimentalresourcedetector) | unknown | | * `container`: unknown
* `host`: unknown
* `process`: unknown
* `service`: unknown
| | [`ExperimentalServiceResourceDetector`](#experimentalserviceresourcedetector) | unknown | | | @@ -7239,7 +7253,7 @@ Latest supported file format: `1.0.0-rc.1` | [`ExperimentalPeerServiceMapping`](#experimentalpeerservicemapping) | supported | | * `peer`: supported
* `service`: supported
| | [`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
| +| [`ExperimentalPrometheusMetricExporter`](#experimentalprometheusmetricexporter) | supported | | * `host`: supported
* `port`: supported
* `translation_strategy`: not_implemented
* `with_resource_constant_labels`: supported
* `without_scope_info`: ignored
* `without_target_info`: ignored
| | [`ExperimentalResourceDetection`](#experimentalresourcedetection) | supported | | * `attributes`: supported
* `detectors`: supported
| | [`ExperimentalResourceDetector`](#experimentalresourcedetector) | supported | | * `container`: supported
* `host`: supported
* `process`: supported
* `service`: supported
| | [`ExperimentalServiceResourceDetector`](#experimentalserviceresourcedetector) | supported | | | @@ -7346,7 +7360,7 @@ Latest supported file format: `1.0.0-rc.2` | [`ExperimentalPeerServiceMapping`](#experimentalpeerservicemapping) | unknown | | * `peer`: unknown
* `service`: unknown
| | [`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
| +| [`ExperimentalPrometheusMetricExporter`](#experimentalprometheusmetricexporter) | unknown | | * `host`: unknown
* `port`: unknown
* `translation_strategy`: unknown
* `with_resource_constant_labels`: unknown
* `without_scope_info`: unknown
* `without_target_info`: 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 15163996..75181902 100644 --- a/schema/meta_schema_language_cpp.yaml +++ b/schema/meta_schema_language_cpp.yaml @@ -134,7 +134,11 @@ typeSupportStatuses: propertyOverrides: [] - type: ExperimentalPrometheusMetricExporter status: supported - propertyOverrides: [] + propertyOverrides: + - property: without_scope_info + status: unknown + - property: without_target_info + status: unknown - type: ExperimentalResourceDetection status: not_implemented propertyOverrides: [] diff --git a/schema/meta_schema_language_java.yaml b/schema/meta_schema_language_java.yaml index b5e70da4..19565142 100644 --- a/schema/meta_schema_language_java.yaml +++ b/schema/meta_schema_language_java.yaml @@ -173,6 +173,8 @@ typeSupportStatuses: status: not_implemented - property: without_scope_info status: ignored + - property: without_target_info + status: ignored - type: ExperimentalResourceDetection status: supported propertyOverrides: [] diff --git a/schema/meta_schema_types.yaml b/schema/meta_schema_types.yaml index 755238cf..2e2687a2 100644 --- a/schema/meta_schema_types.yaml +++ b/schema/meta_schema_types.yaml @@ -415,6 +415,10 @@ description: | Configure Prometheus Exporter to produce metrics without a scope info metric. If omitted or null, false is used. + - property: without_target_info + description: | + Configure Prometheus Exporter to produce metrics without a target info metric for the resource. + If omitted or null, false is used. isSdkExtensionPlugin: false - type: ExperimentalResourceDetection properties: diff --git a/schema/meter_provider.json b/schema/meter_provider.json index 63096701..74c97bcf 100644 --- a/schema/meter_provider.json +++ b/schema/meter_provider.json @@ -192,6 +192,9 @@ "without_scope_info": { "type": ["boolean", "null"] }, + "without_target_info": { + "type": ["boolean", "null"] + }, "with_resource_constant_labels": { "$ref": "common.json#/$defs/IncludeExclude" },