Skip to content

Commit 3d60131

Browse files
author
Alex Boten
authored
add optional configuration for prometheus exporter (#3777)
## Changes The suffix for types and units can be optionally disabled in Prometheus exporters. This PR captures these configuration options to allow them to then be captured by the OpenTelemetry Configuration as well. * [x] Related issues open-telemetry/opentelemetry-configuration#59
1 parent e143970 commit 3d60131

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,8 @@ release.
4848
([#3761](https://github.com/open-telemetry/opentelemetry-specification/pull/3761))
4949
- Clarifications and flexibility in Exemplar speicification.
5050
([#3760](https://github.com/open-telemetry/opentelemetry-specification/pull/3760))
51+
- Add optional configuration for Prometheus exporters to optionally remove unit and type suffixes
52+
([#3777](https://github.com/open-telemetry/opentelemetry-specification/pull/3777))
5153

5254
### Logs
5355

specification/metrics/sdk_exporters/prometheus.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,3 +31,9 @@ By default, it MUST NOT add any resource attributes as metric attributes.
3131
The configuration SHOULD allow the user to select which resource attributes to copy (e.g.
3232
include / exclude or regular expression based). Copied Resource attributes MUST NOT be
3333
excluded from target_info.
34+
35+
A Prometheus Exporter MAY support a configuration option to produce metrics without a [unit suffix](../../compatibility/prometheus_and_openmetrics.md#metric-metadata)
36+
or UNIT metadata. The option MAY be named `without_units`, and MUST be `false` by default.
37+
38+
A Prometheus Exporter MAY support a configuration option to produce metrics without a [type suffix](../../compatibility/prometheus_and_openmetrics.md#metric-metadata).
39+
The option MAY be named `without_type_suffix`, and MUST be `false` by default.

0 commit comments

Comments
 (0)