diff --git a/instrumentation/rocketmq/rocketmq-client/rocketmq-client-java-5.0/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/rocketmqclientjava/v5_0/RocketMqInstrumenterFactory.java b/instrumentation/rocketmq/rocketmq-client/rocketmq-client-java-5.0/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/rocketmqclientjava/v5_0/RocketMqInstrumenterFactory.java index 6aad9bd9bae3..5a5736aebf1a 100644 --- a/instrumentation/rocketmq/rocketmq-client/rocketmq-client-java-5.0/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/rocketmqclientjava/v5_0/RocketMqInstrumenterFactory.java +++ b/instrumentation/rocketmq/rocketmq-client/rocketmq-client-java-5.0/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/rocketmqclientjava/v5_0/RocketMqInstrumenterFactory.java @@ -10,7 +10,6 @@ import io.opentelemetry.instrumentation.api.instrumenter.AttributesExtractor; import io.opentelemetry.instrumentation.api.instrumenter.Instrumenter; import io.opentelemetry.instrumentation.api.instrumenter.InstrumenterBuilder; -import io.opentelemetry.instrumentation.api.instrumenter.SpanKindExtractor; import io.opentelemetry.instrumentation.api.instrumenter.messaging.MessageOperation; import io.opentelemetry.instrumentation.api.instrumenter.messaging.MessagingAttributesExtractor; import io.opentelemetry.instrumentation.api.instrumenter.messaging.MessagingAttributesGetter; @@ -25,7 +24,7 @@ final class RocketMqInstrumenterFactory { private RocketMqInstrumenterFactory() {} public static Instrumenter createProducerInstrumenter( - OpenTelemetry openTelemetry, List capturedHeaders, boolean propagationEnabled) { + OpenTelemetry openTelemetry, List capturedHeaders) { RocketMqProducerAttributeGetter getter = RocketMqProducerAttributeGetter.INSTANCE; MessageOperation operation = MessageOperation.SEND; @@ -47,10 +46,7 @@ public static Instrumenter createProduce } }); - if (propagationEnabled) { - return instrumenterBuilder.buildProducerInstrumenter(MapSetter.INSTANCE); - } - return instrumenterBuilder.buildInstrumenter(SpanKindExtractor.alwaysProducer()); + return instrumenterBuilder.buildProducerInstrumenter(MapSetter.INSTANCE); } private static MessagingAttributesExtractor buildMessagingAttributesExtractor( diff --git a/instrumentation/rocketmq/rocketmq-client/rocketmq-client-java-5.0/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/rocketmqclientjava/v5_0/RocketMqSingletons.java b/instrumentation/rocketmq/rocketmq-client/rocketmq-client-java-5.0/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/rocketmqclientjava/v5_0/RocketMqSingletons.java index 39c6c3dbb532..0d7f963a3a23 100644 --- a/instrumentation/rocketmq/rocketmq-client/rocketmq-client-java-5.0/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/rocketmqclientjava/v5_0/RocketMqSingletons.java +++ b/instrumentation/rocketmq/rocketmq-client/rocketmq-client-java-5.0/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/rocketmqclientjava/v5_0/RocketMqSingletons.java @@ -8,23 +8,17 @@ import io.opentelemetry.api.GlobalOpenTelemetry; import io.opentelemetry.instrumentation.api.instrumenter.Instrumenter; import io.opentelemetry.javaagent.bootstrap.internal.ExperimentalConfig; -import io.opentelemetry.javaagent.bootstrap.internal.InstrumentationConfig; import org.apache.rocketmq.client.java.impl.producer.SendReceiptImpl; import org.apache.rocketmq.client.java.message.PublishingMessageImpl; public final class RocketMqSingletons { - private static final boolean PROPAGATION_ENABLED = - InstrumentationConfig.get() - .getBoolean("otel.instrumentation.rocketmq-client-java.propagation", true); private static final Instrumenter PRODUCER_INSTRUMENTER; static { PRODUCER_INSTRUMENTER = RocketMqInstrumenterFactory.createProducerInstrumenter( - GlobalOpenTelemetry.get(), - ExperimentalConfig.get().getMessagingHeaders(), - PROPAGATION_ENABLED); + GlobalOpenTelemetry.get(), ExperimentalConfig.get().getMessagingHeaders()); } public static Instrumenter producerInstrumenter() {