Skip to content

Commit

Permalink
move netty-* to open-telemetry#11559
Browse files Browse the repository at this point in the history
  • Loading branch information
SylvainJuge committed Jun 12, 2024
1 parent cd85238 commit ae87603
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 21 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,11 @@
import com.google.auto.service.AutoService;
import io.opentelemetry.javaagent.extension.instrumentation.InstrumentationModule;
import io.opentelemetry.javaagent.extension.instrumentation.TypeInstrumentation;
import io.opentelemetry.javaagent.extension.instrumentation.internal.ExperimentalInstrumentationModule;
import java.util.List;
import net.bytebuddy.matcher.ElementMatcher;

@AutoService(InstrumentationModule.class)
public class NettyInstrumentationModule extends InstrumentationModule
implements ExperimentalInstrumentationModule {
public class NettyInstrumentationModule extends InstrumentationModule {
public NettyInstrumentationModule() {
super("netty", "netty-3.8");
}
Expand All @@ -27,11 +25,6 @@ public ElementMatcher.Junction<ClassLoader> classLoaderMatcher() {
return hasClassesNamed("org.jboss.netty.handler.codec.http.HttpMessage");
}

@Override
public String getModuleGroup() {
return "netty";
}

@Override
public List<TypeInstrumentation> typeInstrumentations() {
return asList(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,12 @@
import com.google.auto.service.AutoService;
import io.opentelemetry.javaagent.extension.instrumentation.InstrumentationModule;
import io.opentelemetry.javaagent.extension.instrumentation.TypeInstrumentation;
import io.opentelemetry.javaagent.extension.instrumentation.internal.ExperimentalInstrumentationModule;
import io.opentelemetry.javaagent.instrumentation.netty.v4.common.NettyFutureInstrumentation;
import java.util.List;
import net.bytebuddy.matcher.ElementMatcher;

@AutoService(InstrumentationModule.class)
public class NettyInstrumentationModule extends InstrumentationModule
implements ExperimentalInstrumentationModule {
public class NettyInstrumentationModule extends InstrumentationModule {
public NettyInstrumentationModule() {
super("netty", "netty-4.0");
}
Expand All @@ -33,11 +31,6 @@ public ElementMatcher.Junction<ClassLoader> classLoaderMatcher() {
not(hasClassesNamed("io.netty.handler.codec.http.CombinedHttpHeaders")));
}

@Override
public String getModuleGroup() {
return "netty";
}

@Override
public List<TypeInstrumentation> typeInstrumentations() {
return asList(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,12 @@
import com.google.auto.service.AutoService;
import io.opentelemetry.javaagent.extension.instrumentation.InstrumentationModule;
import io.opentelemetry.javaagent.extension.instrumentation.TypeInstrumentation;
import io.opentelemetry.javaagent.extension.instrumentation.internal.ExperimentalInstrumentationModule;
import io.opentelemetry.javaagent.instrumentation.netty.v4.common.NettyFutureInstrumentation;
import java.util.List;
import net.bytebuddy.matcher.ElementMatcher;

@AutoService(InstrumentationModule.class)
public class NettyInstrumentationModule extends InstrumentationModule
implements ExperimentalInstrumentationModule {
public class NettyInstrumentationModule extends InstrumentationModule {
public NettyInstrumentationModule() {
super("netty", "netty-4.1");
}
Expand All @@ -31,8 +29,10 @@ public ElementMatcher.Junction<ClassLoader> classLoaderMatcher() {
}

@Override
public String getModuleGroup() {
return "netty";
public boolean isIndyModule() {
// netty instrumentation classes are used in other instrumentations which causes class cast
// exceptions
return false;
}

@Override
Expand Down

0 comments on commit ae87603

Please sign in to comment.