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

Add toBuilder() at PrometheusHttpServer #6333

Merged
merged 2 commits into from
Apr 3, 2024

Conversation

asafm
Copy link
Contributor

@asafm asafm commented Mar 31, 2024

Per the conventions we have in the code, I've added the ability to create create a PrometheusHttpServerBuilder out of an existing PrometheusHttpServer.
This is particularly useful if you use AutoConfiguredOpenTelemetrySdkBuilder.addMetricReaderCustomizer(). In that method, you are given a MetricReader instance. In the case of PrometheusHttpServer you need to cast it to PrometheusHttpServer and then you can use the new toBuilder() to modify it.

This is a the completion step for (1) #6179 and (2) #6231

@asafm asafm requested a review from a team as a code owner March 31, 2024 14:29
Copy link

codecov bot commented Mar 31, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 91.11%. Comparing base (98eded9) to head (b90e906).
Report is 2 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff              @@
##               main    #6333      +/-   ##
============================================
+ Coverage     91.07%   91.11%   +0.03%     
- Complexity     5751     5760       +9     
============================================
  Files           626      627       +1     
  Lines         16782    16800      +18     
  Branches       1718     1718              
============================================
+ Hits          15285    15308      +23     
+ Misses         1003      998       -5     
  Partials        494      494              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@asafm
Copy link
Contributor Author

asafm commented Mar 31, 2024

@jack-berg Can you review?

…rometheus/PrometheusHttpServerTest.java

Co-authored-by: jack-berg <34418638+jack-berg@users.noreply.github.com>
@jack-berg jack-berg merged commit bc5eb9e into open-telemetry:main Apr 3, 2024
18 checks passed
@asafm asafm deleted the prometheus-to-builder branch April 7, 2024 10:16
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.

None yet

2 participants