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

Extend prometheus declarative config support to include without_scope_info, with_resource_constant_labels #6840

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

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.

Copy link

codecov bot commented Oct 30, 2024

Codecov Report

Attention: Patch coverage is 92.20779% with 6 lines in your changes missing coverage. Please review.

Project coverage is 90.53%. Comparing base (2e8bf7f) to head (e5d9bbc).

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 ⚠️
...xtension/incubator/fileconfig/ResourceFactory.java 87.50% 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     90.49%   90.53%   +0.03%     
- Complexity     6598     6611      +13     
============================================
  Files           731      732       +1     
  Lines         19735    19762      +27     
  Branches       1938     1948      +10     
============================================
+ Hits          17860    17891      +31     
+ Misses         1283     1277       -6     
- Partials        592      594       +2     

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

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.

1 participant