Skip to content

fix(exporter/prometheus): export exemplars on native histograms#6953

Closed
tcolgate wants to merge 1 commit intoopen-telemetry:mainfrom
tcolgate:prometheusnativeexemplar
Closed

fix(exporter/prometheus): export exemplars on native histograms#6953
tcolgate wants to merge 1 commit intoopen-telemetry:mainfrom
tcolgate:prometheusnativeexemplar

Conversation

@tcolgate
Copy link
Copy Markdown

@tcolgate tcolgate commented Jul 1, 2025

The prometheus exporter had a TODO relating to adding of exemplars to exported native histogram. The upstream prometheus client has been fixed, and otel already depends on the fixed version.

@tcolgate tcolgate changed the title fix(exporter/prometheus): exporter exemplars on native histograms fix(exporter/prometheus): export exemplars on native histograms Jul 1, 2025
@codecov
Copy link
Copy Markdown

codecov Bot commented Jul 1, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 82.8%. Comparing base (04859c7) to head (c166e90).
Report is 1 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##            main   #6953     +/-   ##
=======================================
- Coverage   82.8%   82.8%   -0.1%     
=======================================
  Files        261     261             
  Lines      24312   24313      +1     
=======================================
- Hits       20144   20141      -3     
- Misses      3793    3797      +4     
  Partials     375     375             
Files with missing lines Coverage Δ
exporters/prometheus/exporter.go 82.3% <100.0%> (+<0.1%) ⬆️

... and 3 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@tcolgate tcolgate force-pushed the prometheusnativeexemplar branch from c4355d3 to 5836c66 Compare July 1, 2025 15:48
Copy link
Copy Markdown
Member

@pellared pellared left a comment

Choose a reason for hiding this comment

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

otel already depends on the fixed version.

This is not true

Comment thread CHANGELOG.md Outdated
Comment thread CHANGELOG.md Outdated
@tcolgate tcolgate force-pushed the prometheusnativeexemplar branch from 5836c66 to dd61777 Compare July 2, 2025 07:17
@tcolgate
Copy link
Copy Markdown
Author

tcolgate commented Jul 2, 2025

@dashpole, can you please take a look?

otel already depends on the fixed version.

This is not true.

How so? exporters/prometheus/go.mod already lists 1.22.0, which includes the handling of exemplars on native histograms. Are there bugs? (the test I included passes, and that routes through the relevant code)

Signed-off-by: Tristan Colgate-McFarlane <tristan@cerbos.dev>
@tcolgate tcolgate force-pushed the prometheusnativeexemplar branch from dd61777 to c166e90 Compare July 2, 2025 07:52
@pellared
Copy link
Copy Markdown
Member

pellared commented Jul 2, 2025

which includes the handling of exemplars on native histograms

It does not. See prometheus/client_golang#1816 (comment)

the test I included passes, and that routes through the relevant code

It does not seem to assert everything. See: https://github.com/open-telemetry/opentelemetry-go/pull/6772/files

I think that this PR can should be closed given we already have #6772

@pellared pellared closed this Jul 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants