allow only one propagator per concern
MODIFY
agent-tooling/src/main/java/io/opentelemetry/auto/tooling/PropagatorsInitializer.java
agent-tooling/src/main/java/io/opentelemetry/auto/tooling/PropagatorsInitializer.java
@@ -44,11 +44,18 @@ public class PropagatorsInitializer {
DefaultContextPropagators.Builder propagatorsBuilder = DefaultContextPropagators.builder();
+ boolean addedPropagator = false;
for (String propagatorId : propagators) {
HttpTextFormat textPropagator = TEXTMAP_PROPAGATORS.get(propagatorId.trim().toLowerCase());
if (textPropagator != null) {
+ if (addedPropagator) {
+ log.warn(
+ "Only one propagator per concern can be added, " + textPropagator + " is ignored");
+ continue;
+ }
propagatorsBuilder.addHttpTextFormat(textPropagator);
log.info("Added " + textPropagator + " propagator");
+ addedPropagator = true;
} else {
log.warn("No matching propagator for " + propagatorId);
}

#425 allow only one propagator per concern (#451)