Describe the bug
DefaultConfigProperties.getMap(String) builds the "Invalid map property" error message with the raw property name, so the value shown is null whenever the caller passes a name that needs normalization (hyphens or upper case).
Steps to reproduce
Call getMap with a hyphenated name whose value is a malformed map entry:
DefaultConfigProperties.createFromMap(Collections.singletonMap("test-map", "a=1,b"))
.getMap("test-map");
What did you expect to see?
A message reporting the actual configured value, e.g. Invalid map property: test-map=a=1,b, matching the value lookup that getList already does with ConfigUtil.normalizePropertyKey.
What did you see instead?
Invalid map property: test-map=null. The stored config keys are normalized (test-map -> test.map), but DefaultConfigProperties.getMap() looks the value up with the un-normalized name via config.get(name), so the lookup misses and prints null.
What version and what artifacts are you using?
Artifacts: opentelemetry-sdk-extension-autoconfigure-spi
Version: main @ 09d6c17
How did you reference these artifacts? Gradle, io.opentelemetry:opentelemetry-sdk-extension-autoconfigure-spi
Environment
Compiler: Temurin 21
OS: N/A
Additional context
Only the error message string is affected; getMap's normal return path already uses the normalized key, so hyphenated or mixed-case names work otherwise.
Describe the bug
DefaultConfigProperties.getMap(String)builds the "Invalid map property" error message with the raw property name, so the value shown isnullwhenever the caller passes a name that needs normalization (hyphens or upper case).Steps to reproduce
Call
getMapwith a hyphenated name whose value is a malformed map entry:What did you expect to see?
A message reporting the actual configured value, e.g.
Invalid map property: test-map=a=1,b, matching the value lookup thatgetListalready does withConfigUtil.normalizePropertyKey.What did you see instead?
Invalid map property: test-map=null. The stored config keys are normalized (test-map->test.map), butDefaultConfigProperties.getMap()looks the value up with the un-normalized name viaconfig.get(name), so the lookup misses and printsnull.What version and what artifacts are you using?
Artifacts: opentelemetry-sdk-extension-autoconfigure-spi
Version: main @ 09d6c17
How did you reference these artifacts? Gradle,
io.opentelemetry:opentelemetry-sdk-extension-autoconfigure-spiEnvironment
Compiler: Temurin 21
OS: N/A
Additional context
Only the error message string is affected;
getMap's normal return path already uses the normalized key, so hyphenated or mixed-case names work otherwise.