Skip to content

Commit

Permalink
removed config variable for disabling kafka-clients
Browse files Browse the repository at this point in the history
  • Loading branch information
nayeem-kamal committed Oct 21, 2024
1 parent a11c206 commit 8c7495a
Show file tree
Hide file tree
Showing 11 changed files with 0 additions and 54 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
import com.google.auto.service.AutoService;
import datadog.trace.agent.tooling.Instrumenter;
import datadog.trace.agent.tooling.InstrumenterModule;
import datadog.trace.api.Config;
import java.util.HashMap;
import java.util.Map;

Expand All @@ -18,11 +17,6 @@ public ConsumerCoordinatorInstrumentation() {
super("kafka");
}

@Override
public boolean isEnabled() {
return super.isEnabled() && Config.get().isExperimentalKafkaEnabled();
}

@Override
public Map<String, String> contextStore() {
Map<String, String> contextStores = new HashMap<>(2);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
import com.google.auto.service.AutoService;
import datadog.trace.agent.tooling.Instrumenter;
import datadog.trace.agent.tooling.InstrumenterModule;
import datadog.trace.api.Config;
import java.util.HashMap;
import java.util.Map;
import net.bytebuddy.description.type.TypeDescription;
Expand All @@ -31,11 +30,6 @@ public KafkaConsumerInfoInstrumentation() {
super("kafka");
}

@Override
public boolean isEnabled() {
return super.isEnabled() && Config.get().isExperimentalKafkaEnabled();
}

@Override
public Map<String, String> contextStore() {
Map<String, String> contextStores = new HashMap<>(4);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
import com.google.auto.service.AutoService;
import datadog.trace.agent.tooling.Instrumenter;
import datadog.trace.agent.tooling.InstrumenterModule;
import datadog.trace.api.Config;
import java.util.Collections;
import java.util.HashMap;
import java.util.Iterator;
Expand All @@ -25,11 +24,6 @@ public KafkaConsumerInstrumentation() {
super("kafka");
}

@Override
public boolean isEnabled() {
return super.isEnabled() && Config.get().isExperimentalKafkaEnabled();
}

@Override
public Map<String, String> contextStore() {
Map<String, String> contextStores = new HashMap<>(2);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
import com.google.auto.service.AutoService;
import datadog.trace.agent.tooling.Instrumenter;
import datadog.trace.agent.tooling.InstrumenterModule;
import datadog.trace.api.Config;
import java.util.Map;

@AutoService(InstrumenterModule.class)
Expand All @@ -21,11 +20,6 @@ public KafkaProducerInstrumentation() {
super("kafka");
}

@Override
public boolean isEnabled() {
return super.isEnabled() && Config.get().isExperimentalKafkaEnabled();
}

@Override
public String instrumentedType() {
return "org.apache.kafka.clients.producer.KafkaProducer";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
import com.google.auto.service.AutoService;
import datadog.trace.agent.tooling.Instrumenter;
import datadog.trace.agent.tooling.InstrumenterModule;
import datadog.trace.api.Config;
import java.util.HashMap;
import java.util.Map;
import net.bytebuddy.description.type.TypeDescription;
Expand All @@ -31,11 +30,6 @@ public LegacyKafkaConsumerInfoInstrumentation() {
super("kafka");
}

@Override
public boolean isEnabled() {
return super.isEnabled() && Config.get().isExperimentalKafkaEnabled();
}

@Override
public Map<String, String> contextStore() {
Map<String, String> contextStores = new HashMap<>(4);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
import com.google.auto.service.AutoService;
import datadog.trace.agent.tooling.Instrumenter;
import datadog.trace.agent.tooling.InstrumenterModule;
import datadog.trace.api.Config;
import java.util.Map;
import net.bytebuddy.description.type.TypeDescription;
import net.bytebuddy.matcher.ElementMatcher;
Expand All @@ -22,11 +21,6 @@ public MetadataInstrumentation() {
super("kafka");
}

@Override
public boolean isEnabled() {
return super.isEnabled() && Config.get().isExperimentalKafkaEnabled();
}

@Override
public String hierarchyMarkerType() {
return "org.apache.kafka.clients.Metadata";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@

import datadog.trace.agent.tooling.Instrumenter;
import datadog.trace.agent.tooling.InstrumenterModule;
import datadog.trace.api.Config;

// new - this instrumentation is completely new.
// the purpose of this class is to provide us with information on consumer group and cluster ID
Expand All @@ -15,11 +14,6 @@ public OffsetCommitCallbackInvokerInstrumentation() {
super("kafka");
}

@Override
public boolean isEnabled() {
return super.isEnabled() && Config.get().isExperimentalKafkaEnabled();
}

@Override
public String instrumentedType() {
return "org.apache.kafka.clients.consumer.internals.OffsetCommitCallbackInvoker";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ class KafkaClientCustomPropagationConfigTest extends AgentTestRunner {
super.configurePreAgent()

injectSysConfig("dd.kafka.e2e.duration.enabled", "true")
injectSysConfig("dd.trace.experimental.kafka.enabled","true")
}

def "test kafka client header propagation with topic filters"() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@ abstract class KafkaClientTestBase extends VersionedNamingTestBase {
super.configurePreAgent()

injectSysConfig("dd.kafka.e2e.duration.enabled", "true")
injectSysConfig("dd.trace.experimental.kafka.enabled","true")
}

public static final LinkedHashMap<String, String> PRODUCER_PATHWAY_EDGE_TAGS
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,5 @@ public final class TraceInstrumentationConfig {
/** If set, the instrumentation will set its resource name on the local root too. */
public static final String AXIS_PROMOTE_RESOURCE_NAME = "trace.axis.promote.resource-name";

public static final String EXPERIMENTAL_KAFKA_ENABLED = "trace.experimental.kafka.enabled";

private TraceInstrumentationConfig() {}
}
8 changes: 0 additions & 8 deletions internal-api/src/main/java/datadog/trace/api/Config.java
Original file line number Diff line number Diff line change
Expand Up @@ -410,9 +410,6 @@ public static String getHostName() {
private final boolean kafkaClientPropagationEnabled;
private final Set<String> kafkaClientPropagationDisabledTopics;
private final boolean kafkaClientBase64DecodingEnabled;
// enable the Kafka-3.8 instrumentation manually until testing issues are resolved.
private final boolean experimentalKafkaEnabled;

private final boolean jmsPropagationEnabled;
private final Set<String> jmsPropagationDisabledTopics;
private final Set<String> jmsPropagationDisabledQueues;
Expand Down Expand Up @@ -1551,7 +1548,6 @@ PROFILING_DATADOG_PROFILER_ENABLED, isDatadogProfilerSafeInCurrentEnvironment())
tryMakeImmutableSet(configProvider.getList(KAFKA_CLIENT_PROPAGATION_DISABLED_TOPICS));
kafkaClientBase64DecodingEnabled =
configProvider.getBoolean(KAFKA_CLIENT_BASE64_DECODING_ENABLED, false);
experimentalKafkaEnabled = configProvider.getBoolean(EXPERIMENTAL_KAFKA_ENABLED, false);
jmsPropagationEnabled = isPropagationEnabled(true, "jms");
jmsPropagationDisabledTopics =
tryMakeImmutableSet(configProvider.getList(JMS_PROPAGATION_DISABLED_TOPICS));
Expand Down Expand Up @@ -3016,10 +3012,6 @@ public boolean isKafkaClientBase64DecodingEnabled() {
return kafkaClientBase64DecodingEnabled;
}

public boolean isExperimentalKafkaEnabled() {
return experimentalKafkaEnabled;
}

public boolean isRabbitPropagationEnabled() {
return rabbitPropagationEnabled;
}
Expand Down

0 comments on commit 8c7495a

Please sign in to comment.