Skip to content

Prometheus: Stabilize OpenTelemetry Exemplar to Prometheus Exemplar#4964

Merged
dashpole merged 15 commits intoopen-telemetry:mainfrom
dashpole:otel_to_prom_exemplar
Apr 16, 2026
Merged

Prometheus: Stabilize OpenTelemetry Exemplar to Prometheus Exemplar#4964
dashpole merged 15 commits intoopen-telemetry:mainfrom
dashpole:otel_to_prom_exemplar

Conversation

@dashpole
Copy link
Copy Markdown
Contributor

Fixes #4925

Changes

  • Editorial change: Move type-specific content to the respective type's section
  • Specify that the actual trace Id and span ID take precedence over keys with the name "trace_id" and "span_id", and that they should be dropped last.
  • Restructure spec into bullet points.

@open-telemetry/prometheus-interoperability @krajorama @ywwg @aknuds1

@dashpole dashpole requested review from a team as code owners March 18, 2026 20:38
@dashpole dashpole force-pushed the otel_to_prom_exemplar branch from 3b7c4e9 to 8722bb7 Compare March 18, 2026 20:38
@dashpole dashpole moved this to In progress in Prometheus SIG Mar 18, 2026
Comment thread specification/compatibility/prometheus_and_openmetrics.md Outdated
Comment thread specification/compatibility/prometheus_and_openmetrics.md Outdated
Comment thread specification/compatibility/prometheus_and_openmetrics.md Outdated
Comment thread specification/compatibility/prometheus_and_openmetrics.md Outdated
Comment thread specification/compatibility/prometheus_and_openmetrics.md Outdated
@dashpole dashpole force-pushed the otel_to_prom_exemplar branch 2 times, most recently from f0991ff to 47fb973 Compare April 3, 2026 19:51
Copy link
Copy Markdown
Contributor

@aknuds1 aknuds1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Generally LGTM, but I suggest renaming the Exemplars subsection on line 547 to Exemplar Conversion, for a unique and stable anchor.

Please also see my suggested change on line 466, and I'm wondering why there's no exemplar conversion mention in the ###Gauges section?

Comment thread specification/compatibility/prometheus_and_openmetrics.md Outdated
Comment thread specification/compatibility/prometheus_and_openmetrics.md Outdated
Comment thread specification/compatibility/prometheus_and_openmetrics.md Outdated
Comment thread specification/compatibility/prometheus_and_openmetrics.md Outdated
Comment thread specification/compatibility/prometheus_and_openmetrics.md Outdated
@dashpole
Copy link
Copy Markdown
Contributor Author

dashpole commented Apr 6, 2026

I'm wondering why there's no exemplar conversion mention in the ###Gauges section?

Aren't these dropped?

@aknuds1
Copy link
Copy Markdown
Contributor

aknuds1 commented Apr 7, 2026

Aren't these dropped?

@dashpole Hm, I think it's right that Prometheus' OTLP endpoint drops exemplars for gauges, but I don't even know why. If dropping exemplars for gauges should be part of the spec, why not be explicit instead, and include the motivation?

Copy link
Copy Markdown
Contributor

@aknuds1 aknuds1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please see comment.

Comment thread specification/compatibility/prometheus_and_openmetrics.md Outdated
@dashpole
Copy link
Copy Markdown
Contributor Author

dashpole commented Apr 7, 2026

Hm, I think it's right that Prometheus' OTLP endpoint drops exemplars for gauges, but I don't even know why. If dropping exemplars for gauges should be part of the spec, why not be explicit instead, and include the motivation?

Prometheus doesn't support exemplars on gauges or summaries. We could add that Exemplars SHOULD be dropped to each of them. We wouldn't want to say MUST because its possible Prometheus will support exemplars on those types in the future, and we would want to be able to support them if that happened.

@dashpole dashpole force-pushed the otel_to_prom_exemplar branch from 2632731 to 75ffe03 Compare April 7, 2026 18:54
Comment thread specification/compatibility/prometheus_and_openmetrics.md Outdated
@aknuds1
Copy link
Copy Markdown
Contributor

aknuds1 commented Apr 8, 2026

Prometheus doesn't support exemplars on gauges or summaries. We could add that Exemplars SHOULD be dropped to each of them. We wouldn't want to say MUST because its possible Prometheus will support exemplars on those types in the future, and we would want to be able to support them if that happened.

@dashpole Yes, makes sense. Thanks!

@marcalff marcalff changed the title Prometheus: Stabililze OpenTelemetry Exemplar to Prometheus Exemplar Prometheus: Stabilize OpenTelemetry Exemplar to Prometheus Exemplar Apr 8, 2026
Comment thread specification/compatibility/prometheus_and_openmetrics.md Outdated
Comment thread specification/compatibility/prometheus_and_openmetrics.md Outdated
@dashpole
Copy link
Copy Markdown
Contributor Author

@aknuds1 can you take another review pass?

@aknuds1
Copy link
Copy Markdown
Contributor

aknuds1 commented Apr 16, 2026

Taking another look.

Copy link
Copy Markdown
Contributor

@aknuds1 aknuds1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it looks pretty good, but please see suggestions.

Comment thread specification/compatibility/prometheus_and_openmetrics.md Outdated
Comment thread specification/compatibility/prometheus_and_openmetrics.md Outdated
Comment thread specification/compatibility/prometheus_and_openmetrics.md Outdated
Comment thread specification/compatibility/prometheus_and_openmetrics.md Outdated
dashpole and others added 3 commits April 16, 2026 10:16
Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>
Co-authored-by: David Ashpole <dashpole@google.com>
Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>
@dashpole dashpole added this pull request to the merge queue Apr 16, 2026
Merged via the queue into open-telemetry:main with commit b9b5fbb Apr 16, 2026
9 checks passed
@dashpole dashpole deleted the otel_to_prom_exemplar branch April 16, 2026 15:05
@github-project-automation github-project-automation Bot moved this from In progress to Done in Prometheus SIG Apr 16, 2026
@carlosalberto carlosalberto mentioned this pull request Apr 20, 2026
pull Bot pushed a commit to MC-MAGA/opentelemetry-specification that referenced this pull request Apr 20, 2026
### Context

- Align environment variable context propagation name restrictions with
POSIX.1-2024
  and define normalization behavior.

([open-telemetry#4944](open-telemetry#4944))
- Decouple the responsibilities of the environment variable propagation
carrier.

([open-telemetry#4961](open-telemetry#4961))
- Remove misleading implementation approach the environment variable
propagation.

([open-telemetry#5003](open-telemetry#5003))
- Change Environment Variables as Context Propagation Carriers document
status to Beta.

([open-telemetry#5020](open-telemetry#5020))

### Traces

- Stabilize Tracer `enabled` operation

([open-telemetry#4941](open-telemetry#4941))
- Stabilize `AlwaysRecord` sampler.

([open-telemetry#4934](open-telemetry#4934))

### Metrics

- Add development `maxExportBatchSize` parameter to Periodic exporting
MetricReader.

([open-telemetry#4895](open-telemetry#4895))

### Logs

- Add event to span event bridge.

([open-telemetry#5006](open-telemetry#5006))

### Resource

- Clarify that a Resource describes the observed entity, not the
component
  that technically emits telemetry.

([open-telemetry#4905](open-telemetry#4905))

### Compatibility

- Deprecate OpenTracing compatibility requirements in the specification.

([open-telemetry#4938](open-telemetry#4938))
- Stabilize sections of Prometheus and OpenMetrics Compatibility.
- Stabilize Prometheus Classic Histogram to OTLP Explicit Histogram
transformation.

([open-telemetry#4874](open-telemetry#4874))
  - Stabilize Prometheus Timestamp and Start timestamp transformation.

([open-telemetry#4953](open-telemetry#4953))
- Clarify Prometheus Native Histogram to OTLP Exponential Histogram
conversion,
add conversion rules for Native Histograms with Custom Buckets (NHCB) to
OTLP
    Histogram.

([open-telemetry#4898](open-telemetry#4898))
  - Stabilize Prometheus Dropped Types transformation.

([open-telemetry#4952](open-telemetry#4952))
- Stabilize OpenTelemetry Attributes to Prometheus labels
transformation.

([open-telemetry#4963](open-telemetry#4963))
- Stabilize Prometheus Exemplar to OpenTelemetry Exemplar
transformation.

([open-telemetry#4962](open-telemetry#4962))
  - Stabilize Prometheus Metadata transformation.

([open-telemetry#4954](open-telemetry#4954))
- Stabilize OpenTelemetry Metric Metadata to Prometheus metric metadata.

([open-telemetry#4966](open-telemetry#4966))
- Stabilize OpenTelemetry Exemplar to Prometheus Exemplar
transformation.

([open-telemetry#4964](open-telemetry#4964))
- Stabilize sections of Prometheus Metrics Exporter.
  - Stabilize host configuration.

([open-telemetry#5025](open-telemetry#5025))

### SDK Configuration

- Declarative configuration: add in-development guidance for exposing
the
  effective `Resource` returned by `Create`.

([open-telemetry#4949](open-telemetry#4949))
- Require spec changes to consider declarative config schema

([open-telemetry#4916](open-telemetry#4916))
- Add strict YAML parsing guidance to configuration supplementary
guidelines.

([open-telemetry#4878](open-telemetry#4878))

### OTEPs

- Process Context: Sharing Resource Attributes with External Readers.

([open-telemetry#4719](open-telemetry#4719))
- Support multiple Resources within an SDK.

([open-telemetry#4665](open-telemetry#4665))

---------

Co-authored-by: Jack Berg <34418638+jack-berg@users.noreply.github.com>
hilmarf pushed a commit to apeirora/opentelemetry-specification that referenced this pull request Apr 22, 2026
…pen-telemetry#4964)

Fixes
open-telemetry#4925

## Changes

* Editorial change: Move type-specific content to the respective type's
section
* Specify that the actual trace Id and span ID take precedence over keys
with the name "trace_id" and "span_id", and that they should be dropped
last.
* Restructure spec into bullet points.

@open-telemetry/prometheus-interoperability @krajorama @ywwg @aknuds1

---------

Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>
hilmarf pushed a commit to apeirora/opentelemetry-specification that referenced this pull request Apr 22, 2026
### Context

- Align environment variable context propagation name restrictions with
POSIX.1-2024
  and define normalization behavior.

([open-telemetry#4944](open-telemetry#4944))
- Decouple the responsibilities of the environment variable propagation
carrier.

([open-telemetry#4961](open-telemetry#4961))
- Remove misleading implementation approach the environment variable
propagation.

([open-telemetry#5003](open-telemetry#5003))
- Change Environment Variables as Context Propagation Carriers document
status to Beta.

([open-telemetry#5020](open-telemetry#5020))

### Traces

- Stabilize Tracer `enabled` operation

([open-telemetry#4941](open-telemetry#4941))
- Stabilize `AlwaysRecord` sampler.

([open-telemetry#4934](open-telemetry#4934))

### Metrics

- Add development `maxExportBatchSize` parameter to Periodic exporting
MetricReader.

([open-telemetry#4895](open-telemetry#4895))

### Logs

- Add event to span event bridge.

([open-telemetry#5006](open-telemetry#5006))

### Resource

- Clarify that a Resource describes the observed entity, not the
component
  that technically emits telemetry.

([open-telemetry#4905](open-telemetry#4905))

### Compatibility

- Deprecate OpenTracing compatibility requirements in the specification.

([open-telemetry#4938](open-telemetry#4938))
- Stabilize sections of Prometheus and OpenMetrics Compatibility.
- Stabilize Prometheus Classic Histogram to OTLP Explicit Histogram
transformation.

([open-telemetry#4874](open-telemetry#4874))
  - Stabilize Prometheus Timestamp and Start timestamp transformation.

([open-telemetry#4953](open-telemetry#4953))
- Clarify Prometheus Native Histogram to OTLP Exponential Histogram
conversion,
add conversion rules for Native Histograms with Custom Buckets (NHCB) to
OTLP
    Histogram.

([open-telemetry#4898](open-telemetry#4898))
  - Stabilize Prometheus Dropped Types transformation.

([open-telemetry#4952](open-telemetry#4952))
- Stabilize OpenTelemetry Attributes to Prometheus labels
transformation.

([open-telemetry#4963](open-telemetry#4963))
- Stabilize Prometheus Exemplar to OpenTelemetry Exemplar
transformation.

([open-telemetry#4962](open-telemetry#4962))
  - Stabilize Prometheus Metadata transformation.

([open-telemetry#4954](open-telemetry#4954))
- Stabilize OpenTelemetry Metric Metadata to Prometheus metric metadata.

([open-telemetry#4966](open-telemetry#4966))
- Stabilize OpenTelemetry Exemplar to Prometheus Exemplar
transformation.

([open-telemetry#4964](open-telemetry#4964))
- Stabilize sections of Prometheus Metrics Exporter.
  - Stabilize host configuration.

([open-telemetry#5025](open-telemetry#5025))

### SDK Configuration

- Declarative configuration: add in-development guidance for exposing
the
  effective `Resource` returned by `Create`.

([open-telemetry#4949](open-telemetry#4949))
- Require spec changes to consider declarative config schema

([open-telemetry#4916](open-telemetry#4916))
- Add strict YAML parsing guidance to configuration supplementary
guidelines.

([open-telemetry#4878](open-telemetry#4878))

### OTEPs

- Process Context: Sharing Resource Attributes with External Readers.

([open-telemetry#4719](open-telemetry#4719))
- Support multiple Resources within an SDK.

([open-telemetry#4665](open-telemetry#4665))

---------

Co-authored-by: Jack Berg <34418638+jack-berg@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

[prometheus] Stabilize OTLP->Prometheus: Exemplars

5 participants