Skip to content
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

Refactor Configuration namespace #2027

Merged
merged 5 commits into from
Jan 23, 2023

Conversation

pellared
Copy link
Member

Why

Fixes #1728

What

  • Refactor CompositeConfigurationSource to Configuration which does not implement IConfigurationSource. This way we make sure that Settings classes are for sure that empty string is handled as if there was no value. It is a similar design to Logger and LogSink.
  • Refactor Settings to have abstract method instead of logic inside constructor. Thanks to it we can get rid of reflection in Settings class.
  • Other minor cleanup.

Tests

  • Existing tests
  • Side note: I noticed we are missing tests for GetInt32 , GetDouble, GetBool. I think I will add then in next PR.

@pellared
Copy link
Member Author

pellared commented Jan 20, 2023

Please do not merge until @RassK reviews it.

@pellared pellared marked this pull request as ready for review January 20, 2023 16:30
@pellared pellared requested a review from a team January 20, 2023 16:30
@pellared pellared requested review from RassK and Kielek January 23, 2023 11:38
@pellared pellared enabled auto-merge (squash) January 23, 2023 11:42
@pellared pellared merged commit 3c7d02c into open-telemetry:main Jan 23, 2023
@pellared pellared deleted the refactor-configuration branch January 23, 2023 12:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Refactor ConfigurationSources
3 participants