-
Notifications
You must be signed in to change notification settings - Fork 831
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
Move environment resource to :sdk:all #5544
Move environment resource to :sdk:all #5544
Conversation
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## main #5544 +/- ##
============================================
+ Coverage 91.38% 91.39% +0.01%
- Complexity 4960 4963 +3
============================================
Files 549 551 +2
Lines 14566 14564 -2
Branches 1356 1356
============================================
Hits 13311 13311
+ Misses 868 867 -1
+ Partials 387 386 -1
☔ View full report in Codecov by Sentry. |
After some careful consideration, I'm in favor of option c:
Reasoning:
If others agree, I'll close this PR and others, leaving just #5467 open. I'll adjust #5467 to add a new public API for accessing the resource from the environment. |
public int order() { | ||
// A high order ensures that the environment resource takes precedent over the resources from | ||
// other ResourceProviders | ||
return 10; |
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.
Consider making this a larger number:
return 10; | |
return 10_000; |
or even 1_000_000
. We have a couple of resource providers in instrumentation/contrib that use values 100/200/1000, and they should definitely run before this one. Also a large order number doesn't really change anything, and it does provide some extra flexibility when it comes to customization.
@@ -51,6 +52,6 @@ void getAttributesWithFuzzing() { | |||
"getAttributesWithRandomValues", | |||
new NoGuidance(10000, System.out), | |||
System.out); | |||
assertThat(result.wasSuccessful()).isTrue(); | |||
Assertions.assertThat(result.wasSuccessful()).isTrue(); |
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.
Shouldn't be needed?
Assertions.assertThat(result.wasSuccessful()).isTrue(); | |
assertThat(result.wasSuccessful()).isTrue(); |
Closing in favor of #5554. |
Another attempt to find the right home for environment resource logic. Related to #5464.
Summary of options:
:sdk:common
.:sdk:all
.:sdk:all
. No other similar code lives there.This seems like a pretty exhaustive set of options. Should try to pick our preferred solution so we can unblock stabilization of autoconfigure (this is really the only thorny issue).