diff --git a/specification/metrics/sdk_exporters/prometheus.md b/specification/metrics/sdk_exporters/prometheus.md index 4edcf3625b2..57f9a3a48a2 100644 --- a/specification/metrics/sdk_exporters/prometheus.md +++ b/specification/metrics/sdk_exporters/prometheus.md @@ -5,3 +5,10 @@ Prometheus Exporter is a [Pull Metric Exporter](../sdk.md#pull-metric-exporter) which reacts to the Prometheus scraper and report the metrics passively to [Prometheus](https://prometheus.io/). + +Prometheus Exporter MUST export Meter `library` and `version` information when +enabled by the [Metrics SDK Configuration](../../sdk-environment-variables.md#metrics-sdk-configuration). +The Prometheus Exporter MUST respect the configuration preferences of the application +provide a method to configure whether these data are exported as +[Attributes](../common/common.md#attributes). The `library` and `version` information +will follow the `telemetry` [semantic_conventions](../../../semantic_conventions/resource/telemetry.yaml). diff --git a/specification/sdk-environment-variables.md b/specification/sdk-environment-variables.md index 2e360272810..f9743a99360 100644 --- a/specification/sdk-environment-variables.md +++ b/specification/sdk-environment-variables.md @@ -149,8 +149,13 @@ thrift or protobuf. As of 1.0 of the specification, there | Name | Description | Default | | ----------------------------- | --------------------------------| ---------------------------- | -| OTEL_EXPORTER_PROMETHEUS_HOST | Host used by the Prometheus exporter | All addresses: "0.0.0.0"| -| OTEL_EXPORTER_PROMETHEUS_PORT | Port used by the Prometheus exporter | 9464 | +| `OTEL_EXPORTER_PROMETHEUS_HOST` | Host used by the Prometheus exporter | All addresses: "0.0.0.0"| +| `OTEL_EXPORTER_PROMETHEUS_PORT` | Port used by the Prometheus exporter | 9464 | +| `OTEL_EXPORTER_PROMETHEUS_LIBRARY_ATTRIBUTES` | Filter for if `library` and `version` from [Meter](./metrics/api.md#get-a-meter) are exported. | `false` | | + +Known values for `OTEL_EXPORTER_PROMETHEUS_LIBRARY_ATTRIBUTES` are: +- `true` : Add the Meter `name` and `version` as Attributes on the metrics exported. +- `false` : Don't add Meter `name` and `version` as Attributes on the metrics exported. ## Exporter Selection