Muzzle gRPC Instrumentation
Add muzzle block and remove class loader matcher methods.
MODIFY
dd-java-agent/instrumentation/grpc-1.5/grpc-1.5.gradle
dd-java-agent/instrumentation/grpc-1.5/grpc-1.5.gradle
-apply plugin: 'version-scan'
-
-versionScan {
+muzzle {
+ pass {
group = "io.grpc"
module = "grpc-core"
versions = "[1.5.0,)"
- verifyPresent = [
- "io.grpc.InternalServerInterceptors": null,
- ]
+ }
}
buildscript {

MODIFY
dd-java-agent/instrumentation/grpc-1.5/src/main/java/datadog/trace/instrumentation/grpc/client/GrpcClientBuilderInstrumentation.java
dd-java-agent/instrumentation/grpc-1.5/src/main/java/datadog/trace/instrumentation/grpc/client/GrpcClientBuilderInstrumentation.java
package datadog.trace.instrumentation.grpc.client;
-import static datadog.trace.agent.tooling.ClassLoaderMatcher.classLoaderHasClasses;
import static net.bytebuddy.matcher.ElementMatchers.isMethod;
import static net.bytebuddy.matcher.ElementMatchers.named;
@@ -27,11 +26,6 @@ public class GrpcClientBuilderInstrumentation extends Instrumenter.Default {
return named("io.grpc.internal.AbstractManagedChannelImplBuilder");
}
- @Override
- public ElementMatcher<ClassLoader> classLoaderMatcher() {
- return classLoaderHasClasses("io.grpc.InternalServerInterceptors");
- }
-
@Override
public String[] helperClassNames() {
return new String[] {

MODIFY
dd-java-agent/instrumentation/grpc-1.5/src/main/java/datadog/trace/instrumentation/grpc/server/GrpcServerBuilderInstrumentation.java
dd-java-agent/instrumentation/grpc-1.5/src/main/java/datadog/trace/instrumentation/grpc/server/GrpcServerBuilderInstrumentation.java
package datadog.trace.instrumentation.grpc.server;
-import static datadog.trace.agent.tooling.ClassLoaderMatcher.classLoaderHasClasses;
import static net.bytebuddy.matcher.ElementMatchers.isMethod;
import static net.bytebuddy.matcher.ElementMatchers.named;
@@ -27,11 +26,6 @@ public class GrpcServerBuilderInstrumentation extends Instrumenter.Default {
return named("io.grpc.internal.AbstractServerImplBuilder");
}
- @Override
- public ElementMatcher<ClassLoader> classLoaderMatcher() {
- return classLoaderHasClasses("io.grpc.InternalServerInterceptors");
- }
-
@Override
public String[] helperClassNames() {
return new String[] {

Muzzle gRPC Instrumentation

Add muzzle block and remove class loader matcher methods.