-
Notifications
You must be signed in to change notification settings - Fork 923
Extend prometheus declarative config support to include without_scope_info, with_resource_constant_labels #6840
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
Conversation
…_info, with_resource_constant_labels
| * <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> { |
There was a problem hiding this comment.
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(); |
There was a problem hiding this comment.
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 ReportAttention: Patch coverage is
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. 🚀 New features to boost your workflow:
|
sdk/common/src/test/java/io/opentelemetry/sdk/internal/IncludeExcludePredicateTest.java
Outdated
Show resolved
Hide resolved
…y-java into extend-prometheus-declarative-config
|
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. |
From the schema: https://github.com/open-telemetry/opentelemetry-configuration/blob/e196026e6779e180155537f0e7585a379b40a1d3/examples/kitchen-sink.yaml#L93-L108