Skip to content

Commit b0ed42e

Browse files
committed
pr review
1 parent 372accf commit b0ed42e

File tree

1 file changed

+7
-3
lines changed
  • instrumentation/spring/spring-boot-autoconfigure/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure/internal/properties

1 file changed

+7
-3
lines changed

instrumentation/spring/spring-boot-autoconfigure/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure/internal/properties/SpringConfigProperties.java

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ public SpringConfigProperties(
6363
listPropertyValues.put("otel.propagators", otelSpringProperties.getPropagators());
6464
}
6565

66-
private static Map<String, String> addList(
66+
private static Map<String, String> createMapForListProperty(
6767
String key, List<String> springList, ConfigProperties configProperties) {
6868
if (!springList.isEmpty()) {
6969
return Collections.singletonMap(key, String.join(",", springList));
@@ -80,14 +80,18 @@ private static ConfigProperties createCustomizedListProperties(
8080
ConfigProperties configProperties, OtelSpringProperties otelSpringProperties) {
8181
// io.opentelemetry.instrumentation.resources.ResourceProviderPropertiesCustomizer
8282
// has already been applied before this point, so we have to apply the same logic here
83+
// the logic is implemented here:
84+
// https://github.com/open-telemetry/opentelemetry-java/blob/325822ce8527b83a09274c86a5123a214db80c1d/sdk-extensions/autoconfigure/src/main/java/io/opentelemetry/sdk/autoconfigure/AutoConfiguredOpenTelemetrySdkBuilder.java#L634-L641
85+
// ResourceProviderPropertiesCustomizer gets applied by "propertiesCustomizers"
86+
// and spring properties by "configPropertiesCustomizer", which is later
8387
Map<String, String> map =
8488
new HashMap<>(
85-
addList(
89+
createMapForListProperty(
8690
ENABLED_KEY,
8791
otelSpringProperties.getJavaEnabledResourceProviders(),
8892
configProperties));
8993
map.putAll(
90-
addList(
94+
createMapForListProperty(
9195
DISABLED_KEY,
9296
otelSpringProperties.getJavaDisabledResourceProviders(),
9397
configProperties));

0 commit comments

Comments
 (0)