-
Notifications
You must be signed in to change notification settings - Fork 930
feat(opentelemetry-configuration): creation of basic FileConfigProvider #5863
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
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #5863 +/- ##
==========================================
+ Coverage 95.03% 95.04% +0.01%
==========================================
Files 306 307 +1
Lines 7969 7987 +18
Branches 1611 1614 +3
==========================================
+ Hits 7573 7591 +18
Misses 396 396
🚀 New features to boost your workflow:
|
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.
looks good 🙌
createConfigProvider(); | ||
}); | ||
}); | ||
}); |
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.
nit: I think it could be beneficial to also add some tests for OTEL_EXPERIMENTAL_CONFIG_FILE
- unset
- empty string
- all whitespace
(should all not throw, looking at the code all cases are handled correctly right now already 🙂)
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.
the unset case is already tested, since it what the cases the use env variables do, but good point on adding for the other two, let me do that :)
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.
Done!
Solves #5814
This PR creates the structure for a FileConfigProvider. In this PR it only checks if the file exists and is a YAML, returning an error otherwise.
Parse of the file will be done on a following PR