[CONFIGURATION] File configuration - resource detectors#4113
[CONFIGURATION] File configuration - resource detectors#4113rishitha957 wants to merge 2 commits into
Conversation
Signed-off-by: Rishitha Kalicheti <rkalicheti1@bloomberg.net>
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #4113 +/- ##
==========================================
- Coverage 81.95% 81.77% -0.18%
==========================================
Files 385 388 +3
Lines 16067 16105 +38
==========================================
+ Hits 13166 13168 +2
- Misses 2901 2937 +36
🚀 New features to boost your workflow:
|
marcalff
left a comment
There was a problem hiding this comment.
Thanks for the draft.
This looks good so far and has a very good structure.
Please add unit tests for resource detection, it will help to make progress.
| public: | ||
| std::unique_ptr<AttributesConfiguration> attributes; | ||
| std::unique_ptr<IncludeExcludeConfiguration> detectors; | ||
| std::unique_ptr<ResourceDetectionConfiguration> detection; |
There was a problem hiding this comment.
New member detection looks ok.
Please remove the existing member detectors, it was misplaced and does not comply with the yaml schema.
| for (auto it = node->begin_properties(); it != node->end_properties(); ++it) | ||
| { | ||
| std::string name = it.Name(); | ||
|
|
||
| if (name == "container") | ||
| { | ||
| return std::make_unique<ContainerResourceDetectorConfiguration>(); | ||
| } | ||
| else | ||
| { | ||
| auto extension = std::make_unique<ExtensionResourceDetectorConfiguration>(); | ||
| extension->name = name; | ||
| extension->node = it.Value(); | ||
| return extension; | ||
| } | ||
| } |
There was a problem hiding this comment.
It is weird to have a for loop and return from the middle of it.
Please check for example ConfigurationParser::ParseLogRecordProcessorConfiguration() for the pattern.
|
Current IWYU failure in CI: |
|
Thanks for the PR. Setting as ready for review, please check my comments. |
Fixes #3916
Changes
Please provide a brief description of the changes here.
For significant contributions please make sure you have completed the following items:
CHANGELOG.mdupdated for non-trivial changes