Muzzle Hystrix Instrumentation
Add muzzle block and remove class loader matcher method.
MODIFY
dd-java-agent/instrumentation/hystrix-1.4/hystrix-1.4.gradle
dd-java-agent/instrumentation/hystrix-1.4/hystrix-1.4.gradle
-apply plugin: 'version-scan'
-
-versionScan {
+muzzle {
+ pass {
group = "com.netflix.hystrix"
module = 'hystrix-core'
versions = "[1.4.0,)"
- verifyPresent = [
- "com.netflix.hystrix.AbstractCommand": null,
- ]
+ }
}
apply from: "${rootDir}/gradle/java.gradle"

MODIFY
dd-java-agent/instrumentation/hystrix-1.4/src/main/java/datadog/trace/instrumentation/hystrix/HystrixThreadPoolInstrumentation.java
dd-java-agent/instrumentation/hystrix-1.4/src/main/java/datadog/trace/instrumentation/hystrix/HystrixThreadPoolInstrumentation.java
package datadog.trace.instrumentation.hystrix;
-import static datadog.trace.agent.tooling.ClassLoaderMatcher.classLoaderHasClasses;
import static net.bytebuddy.matcher.ElementMatchers.isMethod;
import static net.bytebuddy.matcher.ElementMatchers.named;
import static net.bytebuddy.matcher.ElementMatchers.takesArguments;
@@ -29,11 +28,6 @@ public class HystrixThreadPoolInstrumentation extends Instrumenter.Default {
"com.netflix.hystrix.strategy.concurrency.HystrixContextScheduler$ThreadPoolWorker");
}
- @Override
- public ElementMatcher<ClassLoader> classLoaderMatcher() {
- return classLoaderHasClasses("com.netflix.hystrix.AbstractCommand");
- }
-
@Override
public Map<ElementMatcher, String> transformers() {
final Map<ElementMatcher, String> transformers = new HashMap<>();

Muzzle Hystrix Instrumentation

Add muzzle block and remove class loader matcher method.