Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support exemplars in Prometheus exporter #3163

Closed
damemi opened this issue Sep 12, 2022 · 9 comments · Fixed by #5111
Closed

Support exemplars in Prometheus exporter #3163

damemi opened this issue Sep 12, 2022 · 9 comments · Fixed by #5111
Assignees
Labels
area:metrics Part of OpenTelemetry Metrics enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed pkg:exporter:prometheus Related to the Prometheus exporter package
Milestone

Comments

@damemi
Copy link
Contributor

damemi commented Sep 12, 2022

Problem Statement

The Prometheus exporter in the new metrics SDK should be updated to support exemplars

Additional Context

Original PR for prometheus exporter: https://github.com/open-telemetry/opentelemetry-go/pull/3135/files#r966288412

@damemi damemi added the enhancement New feature or request label Sep 12, 2022
@MrAlias MrAlias added this to the Metric SDK: Beta milestone Sep 12, 2022
@MrAlias MrAlias added area:metrics Part of OpenTelemetry Metrics pkg:exporter:prometheus Related to the Prometheus exporter package labels Sep 12, 2022
@songjiayang
Copy link

songjiayang commented Sep 13, 2022

really need this feature, thanks.

@MrAlias
Copy link
Contributor

MrAlias commented Oct 14, 2022

Blocked by adding exemplars to the SDK in #559

@MrAlias
Copy link
Contributor

MrAlias commented Oct 20, 2022

Discussed in the SIG meeting today: this might better fit in the post-GA metric SDK project. It needs to be verified that this can be added in a backwards compatible manner. If so, work to add it should be postponed until the specification has stabilized this section.

@MrAlias MrAlias removed this from the Metric SDK: Beta milestone Oct 20, 2022
@MrAlias MrAlias added help wanted Extra attention is needed good first issue Good for newcomers labels Jan 18, 2024
@kernelpanic77
Copy link

kernelpanic77 commented Jan 31, 2024

@MrAlias does this issue still require work ?

@MrAlias
Copy link
Contributor

MrAlias commented Jan 31, 2024

@kernelpanic77 it looks like it does:

// TODO(https://github.com/open-telemetry/opentelemetry-go/issues/3163): support exemplars

Should I assign it to you?

@MrAlias
Copy link
Contributor

MrAlias commented Jan 31, 2024

cc @dashpole

@kernelpanic77
Copy link

@kernelpanic77 it looks like it does:

// TODO(https://github.com/open-telemetry/opentelemetry-go/issues/3163): support exemplars

Should I assign it to you?

Sure I can have a look @MrAlias.
Although don't have much idea about the exporter. I'll get back to you with any queries I have.

@dashpole
Copy link
Contributor

@kernelpanic77 let me know if you need any help with this, as it is fairly complex. For reference, the spec for this is: https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/compatibility/prometheus_and_openmetrics.md#exemplars-1

Exemplars on OpenTelemetry Histograms and Monotonic Sums SHOULD be converted to OpenMetrics exemplars. Exemplars on other OpenTelemetry data points MUST be dropped. ... For Prometheus pull endpoints, only a single exemplar is able to be added to each bucket, so the largest exemplar from each bucket MUST be used, if attaching exemplars. If no exemplars exist on a bucket, the highest exemplar from a lower bucket MUST be used, even though it is a duplicate of another bucket's exemplar. OpenMetrics Exemplars MUST use the trace_id and span_id keys for the trace and span IDs, respectively. Timestamps MUST be added as timestamps on the OpenMetrics exemplar, and filtered_attributes MUST be added as labels on the OpenMetrics exemplar unless they would exceed the OpenMetrics limit on characters.

@kernelpanic77
Copy link

kernelpanic77 commented Feb 12, 2024

Hi @dashpole,
Thanks for the reference, i'm having a look at the spec for this. I am still trying to get familiar with prometheus exporters and the otel-go lib. Can we discuss this in the otel-go SIG this week ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:metrics Part of OpenTelemetry Metrics enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed pkg:exporter:prometheus Related to the Prometheus exporter package
Development

Successfully merging a pull request may close this issue.

5 participants