Skip to content

Commit fe2886b

Browse files
committed
normalize system props before lookup to avoid ambiguity of "experimental-foo" and "experimental.foo" that both translate to "foo/development"
1 parent 2cc9cf0 commit fe2886b

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

instrumentation-api/src/main/java/io/opentelemetry/instrumentation/api/internal/ConfigPropertiesUtil.java

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,12 +36,10 @@ public final class ConfigPropertiesUtil {
3636
public static Map<String, String> load() {
3737
Map<String, String> config = new HashMap<>();
3838
System.getenv()
39-
.forEach(
40-
(name, value) -> config.put(normalizeEnvironmentVariableKey(name), value));
39+
.forEach((name, value) -> config.put(normalizeEnvironmentVariableKey(name), value));
4140
safeSystemProperties()
4241
.forEach(
43-
(key, value) ->
44-
config.put(normalizePropertyKey(key.toString()), value.toString()));
42+
(key, value) -> config.put(normalizePropertyKey(key.toString()), value.toString()));
4543
return config;
4644
}
4745

0 commit comments

Comments
 (0)