KEMBAR78
Add toBuilder() at PrometheusHttpServer by asafm · Pull Request #6333 · open-telemetry/opentelemetry-java · GitHub
Skip to content

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 March 31, 2024 14:29
@codecov
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
@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.

2 participants