Skip to content

[EXPORTER] Fix PrometheusExporter to propagate new options to collector#4055

Merged
marcalff merged 5 commits into
open-telemetry:mainfrom
jaehyeong-cho:enable-prom-exporter-options
May 7, 2026
Merged

[EXPORTER] Fix PrometheusExporter to propagate new options to collector#4055
marcalff merged 5 commits into
open-telemetry:mainfrom
jaehyeong-cho:enable-prom-exporter-options

Conversation

@jaehyeong-cho
Copy link
Copy Markdown
Contributor

@jaehyeong-cho jaehyeong-cho commented May 5, 2026

Fixes #4052

Changes

Please provide a brief description of the changes here.

I read the comment at #4052 (comment), but understood that the topic of discussion there is more general in scope and has wider impact than this issue. Therefore, this PR aims to focus on fixing the bug described in the issue while maintaining public API backward compatibility (though ABI compatibility may be affected).

  • Added member variables and constructor arguments to PrometheusCollector (with default values for backward compatibility)
  • Updated PrometheusExporter to pass the new options when constructing PrometheusCollector

For significant contributions please make sure you have completed the following items:

  • CHANGELOG.md updated for non-trivial changes
  • Unit tests have been added
  • Changes in public API reviewed

@linux-foundation-easycla
Copy link
Copy Markdown

linux-foundation-easycla Bot commented May 5, 2026

CLA Signed

The committers listed above are authorized under a signed CLA.

@jaehyeong-cho jaehyeong-cho force-pushed the enable-prom-exporter-options branch 2 times, most recently from ed0ccdc to 73496ab Compare May 6, 2026 00:50
@marcalff marcalff added the pr:waiting-on-cla Waiting on CLA label May 6, 2026
@jaehyeong-cho jaehyeong-cho force-pushed the enable-prom-exporter-options branch from 73496ab to 85676db Compare May 6, 2026 00:54
@jaehyeong-cho jaehyeong-cho marked this pull request as ready for review May 6, 2026 00:56
@jaehyeong-cho jaehyeong-cho requested a review from a team as a code owner May 6, 2026 00:56
@jaehyeong-cho jaehyeong-cho force-pushed the enable-prom-exporter-options branch from 2535da5 to ff8c097 Compare May 6, 2026 01:20
@marcalff marcalff removed the pr:waiting-on-cla Waiting on CLA label May 6, 2026
@codecov
Copy link
Copy Markdown

codecov Bot commented May 6, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 82.06%. Comparing base (ec85d57) to head (4880ae7).

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #4055      +/-   ##
==========================================
- Coverage   82.07%   82.06%   -0.00%     
==========================================
  Files         385      385              
  Lines       15896    15900       +4     
==========================================
+ Hits        13045    13047       +2     
- Misses       2851     2853       +2     
Files with missing lines Coverage Δ
exporters/prometheus/src/collector.cc 91.67% <100.00%> (+1.20%) ⬆️
exporters/prometheus/src/exporter.cc 54.55% <100.00%> (+2.17%) ⬆️

... and 1 file with indirect coverage changes

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

Copy link
Copy Markdown
Member

@marcalff marcalff left a comment

Choose a reason for hiding this comment

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

LGTM, thanks for the fix.

@marcalff
Copy link
Copy Markdown
Member

marcalff commented May 7, 2026

I read the comment at #4052 (comment), but understood that the topic of discussion there is more general in scope and has wider impact than this issue. Therefore, this PR aims to focus on fixing the bug described in the issue while maintaining public API backward compatibility (though ABI compatibility may be affected).

Agreed.

@marcalff marcalff merged commit 222d3e0 into open-telemetry:main May 7, 2026
70 checks passed
@jaehyeong-cho
Copy link
Copy Markdown
Contributor Author

Thank you for reviewing.

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.

[EXPORTER] PrometheusExporter: without_units and without_type_suffix options have no effect

2 participants