-
Notifications
You must be signed in to change notification settings - Fork 869
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
Don't pass configuration to SDK autoconfigure through system props #3866
Don't pass configuration to SDK autoconfigure through system props #3866
Conversation
|
||
/** | ||
* Returns a boolean-valued configuration property or {@code defaultValue} if a property with name | ||
* {@code name} has not been configured. | ||
*/ | ||
public boolean getBooleanProperty(String name, boolean defaultValue) { |
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.
I'm planning to rename all get*Property()
methods to get*()
in the next PR - those shorter names seem a bit nicer, and they're consistent with the SDK ConfigProperties
interface too.
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.
is the plan to have this implement ConfigProperties
then?
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.
Unfortunately that won't be possible with the current shape of this repo: instrumentation-api
only uses OTel API, not the SDK, so we can't directly implement the ConfigProperties
interface here.
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.
ok then. makes sense!
allProperties.forEach( | ||
(key, value) -> { | ||
if (!environmentProperties.containsKey(key) | ||
&& key.startsWith("otel.") | ||
&& !key.startsWith("otel.instrumentation")) { | ||
System.setProperty(key, value); | ||
} | ||
}); |
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.
🎉
No description provided.