Manual merge of tyler/classloader-precheck
This commit is contained in:
parent
47fb25a8f8
commit
d6638f4ff5
|
@ -1,5 +1,6 @@
|
|||
package datadog.trace.instrumentation.playws;
|
||||
|
||||
import static datadog.trace.agent.tooling.ClassLoaderMatcher.classLoaderHasNoResources;
|
||||
import static datadog.trace.agent.tooling.bytebuddy.matcher.DDElementMatchers.hasInterface;
|
||||
import static java.util.Collections.singletonMap;
|
||||
import static net.bytebuddy.matcher.ElementMatchers.isMethod;
|
||||
|
@ -20,6 +21,13 @@ public abstract class BasePlayWSClientInstrumentation extends Instrumenter.Defau
|
|||
super("play-ws");
|
||||
}
|
||||
|
||||
@Override
|
||||
public ElementMatcher<ClassLoader> classLoaderMatcher() {
|
||||
// Optimization for expensive typeMatcher.
|
||||
return not(
|
||||
classLoaderHasNoResources("play/shaded/ahc/org/asynchttpclient/AsyncHttpClient.class"));
|
||||
}
|
||||
|
||||
@Override
|
||||
public ElementMatcher<? super TypeDescription> typeMatcher() {
|
||||
// CachingAsyncHttpClient rejects overrides to AsyncHandler
|
||||
|
|
Loading…
Reference in New Issue