Skip to content

Commit

Permalink
add optional configuration for prometheus exporter (open-telemetry#3777)
Browse files Browse the repository at this point in the history
## 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
  • Loading branch information
Alex Boten authored Dec 13, 2023
1 parent 44401b3 commit cb03f1d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@ release.
([#3761](https://github.com/open-telemetry/opentelemetry-specification/pull/3761))
- Clarifications and flexibility in Exemplar speicification.
([#3760](https://github.com/open-telemetry/opentelemetry-specification/pull/3760))
- Add optional configuration for Prometheus exporters to optionally remove unit and type suffixes
([#3777](https://github.com/open-telemetry/opentelemetry-specification/pull/3777))

### Logs

Expand Down
6 changes: 6 additions & 0 deletions specification/metrics/sdk_exporters/prometheus.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,9 @@ By default, it MUST NOT add any resource attributes as metric attributes.
The configuration SHOULD allow the user to select which resource attributes to copy (e.g.
include / exclude or regular expression based). Copied Resource attributes MUST NOT be
excluded from target_info.

A Prometheus Exporter MAY support a configuration option to produce metrics without a [unit suffix](../../compatibility/prometheus_and_openmetrics.md#metric-metadata)
or UNIT metadata. The option MAY be named `without_units`, and MUST be `false` by default.

A Prometheus Exporter MAY support a configuration option to produce metrics without a [type suffix](../../compatibility/prometheus_and_openmetrics.md#metric-metadata).
The option MAY be named `without_type_suffix`, and MUST be `false` by default.

0 comments on commit cb03f1d

Please sign in to comment.