feat(configuration): refactoring config loader to print warning message#6524
Merged
pichlermarc merged 8 commits intoopen-telemetry:mainfrom Apr 8, 2026
Merged
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #6524 +/- ##
==========================================
- Coverage 95.75% 95.73% -0.02%
==========================================
Files 364 366 +2
Lines 12096 12138 +42
Branches 2885 2893 +8
==========================================
+ Hits 11582 11620 +38
- Misses 514 518 +4
🚀 New features to boost your workflow:
|
maryliag
approved these changes
Apr 8, 2026
Contributor
maryliag
left a comment
There was a problem hiding this comment.
Thank you for working on this
LGTM
Contributor
|
Btw, I updated the PR description to say "Part Of" instead of "Fixes", since this PR is just the start and not the complete solution for that issue |
5 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part Of #6107
While I wanted to add some simple debug logs, I noticed that it might require a bigger change.
I started small with only two env variables
OTEL_TRACES_SAMPLERandOTEL_TRACES_SAMPLER_ARGto make sure we all agree on the approach.The new approach for loading the config (and adding warning logs) is the following:
Note that everything is strongly typed, I just did
Stringfor now, but it can be super easily extended toBool,NumberandStringList. I also added unit test around new functions.Very open to any feedback, my plan was to start small to validate the approach, and if you like it, I can do follow-up PRs to adopt this mechanism in all the
EnvironmentConfigFactory.tsPlease delete options that are not relevant.
Checklist:
Output of local unit test running