Skip to content

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

Open
jaehyeong-cho wants to merge 4 commits intoopen-telemetry:mainfrom
jaehyeong-cho:enable-prom-exporter-options
Open

[EXPORTER] Fix PrometheusExporter to propagate new options to collector#4055
jaehyeong-cho wants to merge 4 commits intoopen-telemetry:mainfrom
jaehyeong-cho:enable-prom-exporter-options

Conversation

@jaehyeong-cho
Copy link
Copy Markdown

@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.04%. Comparing base (029f74e) to head (8120f9e).

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #4055      +/-   ##
==========================================
+ Coverage   82.04%   82.04%   +0.01%     
==========================================
  Files         385      385              
  Lines       15896    15900       +4     
==========================================
+ Hits        13040    13044       +4     
  Misses       2856     2856              
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%) ⬆️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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