Skip to content

Commit 867445f

Browse files
ArthurSensreyangdashpole
authored
sdk_exporters/prometheus: Clarify Content Negotiation (#4543)
## Changes Addressing feedback received during the last Spec SIG meeting, I'm splitting my previous PR(#4533) into two to ensure we keep the scope of the original one for the configuration changes. If I understand correctly, almost all SDKs (if not all) are already compliant since they are wrappers around Prometheus SDKs, and Prometheus SDKs already do content negotiation properly. Then the PoCs are already done :) * [X] Related issues #4494 * [ ] Links to the prototypes (when adding or changing features) * [x] [`CHANGELOG.md`](https://github.com/open-telemetry/opentelemetry-specification/blob/main/CHANGELOG.md) file updated for non-trivial changes * [ ] [`spec-compliance-matrix.md`](https://github.com/open-telemetry/opentelemetry-specification/blob/main/spec-compliance-matrix.md) updated if necessary --------- Signed-off-by: Arthur Silva Sens <[email protected]> Co-authored-by: Reiley Yang <[email protected]> Co-authored-by: David Ashpole <[email protected]>
1 parent f324fdb commit 867445f

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,9 @@ release.
4040

4141
### Compatibility
4242

43+
- Clarify expectations about Prometheus content negotiation for metric names.
44+
([#4543](https://github.com/open-telemetry/opentelemetry-specification/pull/4543))
45+
4346
### SDK Configuration
4447

4548
### Common

specification/metrics/sdk_exporters/prometheus.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,3 +74,9 @@ The option MAY be named `without_scope_info`, and MUST be `false` by default.
7474

7575
A Prometheus Exporter MAY support a configuration option to produce metrics without a [target info](../../compatibility/prometheus_and_openmetrics.md#resource-attributes-1)
7676
metric. The option MAY be named `without_target_info`, and MUST be `false` by default.
77+
78+
## Content Negotiation
79+
80+
A Prometheus Exporter MUST support content negotiation to allow clients to request
81+
metrics in different formats based on the `Accept` header in HTTP requests. Content
82+
negotiation MUST follow [Prometheus Content Negotiation guidelines](https://prometheus.io/docs/instrumenting/content_negotiation/).

0 commit comments

Comments
 (0)