Skip to content

Conversation

@jack-berg jack-berg requested a review from a team as a code owner October 30, 2024 21:25
* <p>This class is internal and is hence not for public use. Its APIs are unstable and can change
* at any time.
*/
public final class IncludeExcludePredicate implements Predicate<String> {
Copy link
Member Author

Choose a reason for hiding this comment

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

We have a recurring pattern of needing to match strings against a configurable allow / deny list, with optional glob pattern matching. In all these cases, its beneficial to have a useful toString() implementation.

This PR refactors the places this pattern occurs with a common implementation.

joiner.add(
"defaultAggregationSelector="
+ DefaultAggregationSelector.asString(defaultAggregationSelector));
return joiner.toString();
Copy link
Member Author

Choose a reason for hiding this comment

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

This PR also improves the PrometheusHttpServer#toString() implementation, which has been failing to include the various configurable parameters.

@codecov
Copy link

codecov bot commented Oct 30, 2024

Codecov Report

Attention: Patch coverage is 92.85714% with 5 lines in your changes missing coverage. Please review.

Project coverage is 89.88%. Comparing base (d9c9583) to head (cfaf70a).
Report is 5 commits behind head on main.

Files with missing lines Patch % Lines
...elemetry/sdk/internal/IncludeExcludePredicate.java 92.10% 1 Missing and 2 partials ⚠️
...ometheus/internal/PrometheusComponentProvider.java 90.90% 0 Missing and 1 partial ⚠️
...dk/extension/incubator/fileconfig/ViewFactory.java 75.00% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               main    #6840      +/-   ##
============================================
+ Coverage     89.85%   89.88%   +0.02%     
- Complexity     7005     7017      +12     
============================================
  Files           798      799       +1     
  Lines         21211    21240      +29     
  Branches       2055     2065      +10     
============================================
+ Hits          19059    19091      +32     
+ Misses         1493     1488       -5     
- Partials        659      661       +2     

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

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

@jack-berg
Copy link
Member Author

Note this PR was discussed / requested in this discussion: #7473

If folks can review, I think we should move forward with this PR. Its still valuable and low risk.

@jack-berg jack-berg merged commit cecfb83 into open-telemetry:main Jul 10, 2025
29 checks passed
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