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 experimental ConditionalResourceProvider interface #4731

Merged

Conversation

mateuszrzeszutek
Copy link
Member

Alternative implementation of #4718; we talked about this in yesterday's SIG meeting.

If this looks okay to you, I'll add some tests and mark it as ready for review.

@codecov
Copy link

codecov bot commented Sep 2, 2022

Codecov Report

Base: 90.60% // Head: 90.61% // Increases project coverage by +0.00% 🎉

Coverage data is based on head (5a279b5) compared to base (57b05cb).
Patch coverage: 100.00% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff            @@
##               main    #4731   +/-   ##
=========================================
  Coverage     90.60%   90.61%           
- Complexity     4906     4908    +2     
=========================================
  Files           567      567           
  Lines         14728    14731    +3     
  Branches       1414     1416    +2     
=========================================
+ Hits          13345    13348    +3     
  Misses          959      959           
  Partials        424      424           
Impacted Files Coverage Δ
...metry/sdk/autoconfigure/ResourceConfiguration.java 100.00% <100.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@@ -46,6 +47,10 @@ static Resource configureResource(
if (disabledProviders.contains(resourceProvider.getClass().getName())) {
continue;
}
if (resourceProvider instanceof ConditionalResourceProvider
&& !((ConditionalResourceProvider) resourceProvider).shouldApply(config, result)) {
continue;
Copy link
Member

Choose a reason for hiding this comment

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

Nice I support 👍

@mateuszrzeszutek mateuszrzeszutek marked this pull request as ready for review September 2, 2022 14:03
@mateuszrzeszutek mateuszrzeszutek requested a review from a user September 2, 2022 14:03
@jack-berg jack-berg merged commit 6c11793 into open-telemetry:main Sep 8, 2022
@mateuszrzeszutek mateuszrzeszutek deleted the conditional-resource-provider branch September 9, 2022 09:11
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