declarative config filtering resource attributes should include by default.#8177
Conversation
|
Also, it would be convenient if anyone with the permissions could assign this PR to me as I don't have the reviewer/triager role in this repository (only in instrumentation) |
…nto include-exclude-include-by-default
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #8177 +/- ##
=========================================
Coverage 90.29% 90.29%
- Complexity 7650 7652 +2
=========================================
Files 843 843
Lines 23059 23061 +2
Branches 2309 2310 +1
=========================================
+ Hits 20822 20824 +2
Misses 1519 1519
Partials 718 718 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
jack-berg
left a comment
There was a problem hiding this comment.
This corrects a bug and reflects the current language of the IncludeExclude type. Specifically, excluded description says:
Configure list of value patterns to exclude. Applies after .included (i.e. excluded has higher priority than included).
And .included default and null behavior says:
If omitted, all values are included.
This PR corrects the java implementation to treat omitting null as include *.
@SylvainJuge Assignment doesn't really have any meaning in this repo (to my knowledge). What were you hoping to achieve by being assigned? |
@jack-berg this is how I track the things I work on, however this is not very practical for repositories where I can't self-assign. |
When using declarative configuration for resource attribute detectors, we get a surprising behavior when trying to only exclude attributes without explicitly including.
For example with the following configuration will make all the detected attributes ignored:
In order to work-around this, we have to explicitly include everything with:
This PR:
included: ['*']As an alternative, we could also probably make this change generic in all the places where
IncludeExcludePredicateis used to ensure this is applied everywhere, however this would require to make the callers deal with the corner case of "include none" to be replaced with "ignore all".