-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Removed different types of Detectors for Resources. #1810
Conversation
This change simplifies different types of collectors into one list. The order of this list determines how they are applied. Defaults are applied when the user does not supply any detectors. To achieve default behavior and additional behavior a DefaultDetectors struct has been created
Codecov Report
@@ Coverage Diff @@
## main #1810 +/- ##
=======================================
- Coverage 78.7% 78.7% -0.1%
=======================================
Files 137 137
Lines 7373 7363 -10
=======================================
- Hits 5806 5798 -8
+ Misses 1322 1320 -2
Partials 245 245
|
Added examples of use of WithDetectors.
This changes because WithDetector() no longer is the same as not using WithDetector()
I need to get a new R key it seems. Co-authored-by: Sam Xie <[email protected]>
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.
I still find it strange that the function name New
means "pre-populated," and NewEmptyResource
means "empty," but has to stutter to get there. This seems like a too-literal reading of the specification's prescription for certain detectors being built in.
I don't take that to mean that every resource needs to enjoy these detectors unless told otherwise. Instead, I take that to mean that every SDK has to include these detectors at minimum, so that they're available for use.
I'd prefer that resource.New
start with an empty resource, and that we provide a WithBuiltins
or WithBuiltinDetectors
option to allow the caller to include those built-in detectors. If a caller forgets to use WithBuiltins
or WithBuiltinDetectors
, that's not a failure of the library.
I see your point, and overall share your view on this naming strategy. It is hard to say definitively one way or another without user research what our users will want in the end. But, I think you are right that having I would like to know what @jmacd thinks? |
I think this is the wrong approach. I would expect that most uses of a resource would be likely to include the built-in detectors. But, without any user stories (or probably more likely instrumentation libraries) I am willing to accept this. |
Let's not give up on reaching accord. We have been through quite a journey on this topic. Was there an earlier version where |
I think we have reached an accord, just not a unamious one. We have two different paths one The former is probably more common, but I think less useful in this case. The problem is that without any use-case data it is just what I think. If 3 out of the 4 people, including myself, who have commented so far came to the same conclusion then I am willing to commit to the majority decision. I don't think we can change this behavior after 1.0, but I think the worst thing that comes out of the current configuration is there is a lot of missing resource descriptions, and a lot of extra |
Co-authored-by: Tyler Yahn <[email protected]>
This change simplifies different types of collectors into one list. The order of this list determines how they are applied. Defaults are applied when the user does not supply any detectors. To achieve default behavior and additional behavior a DefaultDetectors struct has been created.
This addresses usability concerns from #1690
Feedback request:
Does this simplify things too much?
Is this better than what we have?
Closes #1813