Remove copy-paste from spring and trace instrumentation
MODIFY
dd-java-agent/instrumentation/spring-web/src/main/java/datadog/trace/instrumentation/springweb/SpringWebInstrumentation.java
dd-java-agent/instrumentation/spring-web/src/main/java/datadog/trace/instrumentation/springweb/SpringWebInstrumentation.java
@@ -16,10 +16,6 @@ import datadog.trace.agent.tooling.Instrumenter;
import datadog.trace.api.DDTags;
import io.opentracing.Scope;
import io.opentracing.util.GlobalTracer;
-import java.sql.PreparedStatement;
-import java.util.Collections;
-import java.util.Map;
-import java.util.WeakHashMap;
import javax.servlet.http.HttpServletRequest;
import net.bytebuddy.agent.builder.AgentBuilder;
import net.bytebuddy.asm.Advice;
@@ -27,8 +23,6 @@ import org.springframework.web.servlet.HandlerMapping;
@AutoService(Instrumenter.class)
public final class SpringWebInstrumentation implements Instrumenter {
- public static final Map<PreparedStatement, String> preparedStatements =
- Collections.synchronizedMap(new WeakHashMap<PreparedStatement, String>());
@Override
public AgentBuilder instrument(final AgentBuilder agentBuilder) {

MODIFY
dd-java-agent/instrumentation/trace-annotation/src/main/java/datadog/trace/instrumentation/trace_annotation/TraceAnnotationInstrumentation.java
dd-java-agent/instrumentation/trace-annotation/src/main/java/datadog/trace/instrumentation/trace_annotation/TraceAnnotationInstrumentation.java
@@ -13,17 +13,12 @@ import io.opentracing.Span;
import io.opentracing.tag.Tags;
import io.opentracing.util.GlobalTracer;
import java.lang.reflect.Method;
-import java.sql.PreparedStatement;
import java.util.Collections;
-import java.util.Map;
-import java.util.WeakHashMap;
import net.bytebuddy.agent.builder.AgentBuilder;
import net.bytebuddy.asm.Advice;
@AutoService(Instrumenter.class)
public final class TraceAnnotationInstrumentation implements Instrumenter {
- public static final Map<PreparedStatement, String> preparedStatements =
- Collections.synchronizedMap(new WeakHashMap<PreparedStatement, String>());
@Override
public AgentBuilder instrument(final AgentBuilder agentBuilder) {

Remove copy-paste from spring and trace instrumentation