-
Notifications
You must be signed in to change notification settings - Fork 875
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
Align SpringConfigProperties with DefaultConfigProperties #12398
Align SpringConfigProperties with DefaultConfigProperties #12398
Conversation
5485755
to
73c31cd
Compare
great catch! |
if (value == null && name.equals("otel.exporter.otlp.protocol")) { | ||
String normalizedName = ConfigUtil.normalizePropertyKey(name); | ||
String value = environment.getProperty(normalizedName, String.class); | ||
if (value == null && normalizedName.equals("otel.exporter.otlp.protocol")) { |
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.
if (value == null && normalizedName.equals("otel.exporter.otlp.protocol")) { | |
if (value == null && "otel.exporter.otlp.protocol".equals(normalizedName) { |
Maybe this is better, it can avoid the influence from upstream API. The line 116 is same.
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.
From my understanding, normalizedName
can't be null
at this point.
I would prefer to limit the changes in this PR.
I personally agree with your suggestion.
Perhaps this change could be discussed in another PR. Feel free to create it.
@steverao @zeitlinger Could you please have another look? |
DefaultConfigProperties
allows the user to retrieve a property value from an environment variable.This modification allows the user to get a property value from an environment variable and from the implementation of an OTel SDK SPI declared as a bean.