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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove instrumentation (and tooling) specific properties from Config #1286

Merged

Conversation

mateuszrzeszutek
Copy link
Member

@mateuszrzeszutek mateuszrzeszutek commented Sep 29, 2020

Resolves #1277

I like how the Config class looks like now 馃槃

@mateuszrzeszutek mateuszrzeszutek force-pushed the config-refactoring-part-2 branch 4 times, most recently from 0f91c3c to 502782c Compare September 29, 2020 16:11
@mateuszrzeszutek mateuszrzeszutek marked this pull request as ready for review September 29, 2020 16:46
@mateuszrzeszutek
Copy link
Member Author

Regarding #1254 (comment): I've checked all usages and everything besides the Kafka one looks OK. In case of Kafka unit tests change the configuration over and over again during a single scenario which makes it impossible to store the boolean flag in a simple static final constant. I've tried several things but nothing worked out. I guess we're left with three options:

  1. leave it like it is;
  2. add a static getter method and use PowerMock;
  3. rewrite the unit tests from scratch.

Copy link
Contributor

@anuraaga anuraaga left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @mateuszrzeszutek - I think for Kafka, if the tests can be rewritten to only set config once per test, which I guess is a normal pattern, that would be nice, but can be another PR

@mateuszrzeszutek
Copy link
Member Author

mateuszrzeszutek commented Sep 30, 2020

f the tests can be rewritten to only set config once per test, which I guess is a normal pattern, that would be nice, but can be another PR

I agree -- after thinking about it I believe this is the way to go. Especially if we want to use full agent jar in tests -- in that case dynamically changing property value in the middle of the scenario would be pretty difficult.

Added issue: #1292

Copy link
Member

@trask trask left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

馃憤

@trask trask merged commit c7fc261 into open-telemetry:master Sep 30, 2020
@mateuszrzeszutek mateuszrzeszutek deleted the config-refactoring-part-2 branch November 18, 2022 10: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.

Remove instrumentation (and tooling) specific properties from Config
4 participants