Akka server indy support (#12243)
This commit is contained in:
parent
32fd44ebf2
commit
68e844e129
|
@ -11,15 +11,22 @@ import static java.util.Arrays.asList;
|
|||
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 AkkaHttpServerInstrumentationModule extends InstrumentationModule {
|
||||
public class AkkaHttpServerInstrumentationModule extends InstrumentationModule
|
||||
implements ExperimentalInstrumentationModule {
|
||||
public AkkaHttpServerInstrumentationModule() {
|
||||
super("akka-http", "akka-http-10.0", "akka-http-server");
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getModuleGroup() {
|
||||
return "akka-http";
|
||||
}
|
||||
|
||||
@Override
|
||||
public ElementMatcher.Junction<ClassLoader> classLoaderMatcher() {
|
||||
// in GraphInterpreterInstrumentation we instrument a class that belongs to akka-streams, make
|
||||
|
@ -27,13 +34,6 @@ public class AkkaHttpServerInstrumentationModule extends InstrumentationModule {
|
|||
return hasClassesNamed("akka.http.scaladsl.HttpExt");
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isIndyModule() {
|
||||
// AkkaHttpServerInstrumentationModule and AkkaHttpServerRouteInstrumentationModule share
|
||||
// AkkaRouteHolder class
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<TypeInstrumentation> typeInstrumentations() {
|
||||
return asList(
|
||||
|
|
|
@ -10,6 +10,7 @@ import static java.util.Arrays.asList;
|
|||
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;
|
||||
|
||||
/**
|
||||
|
@ -17,16 +18,15 @@ import java.util.List;
|
|||
* AkkaHttpServerInstrumentationModule applies to classes in akka-http-core.jar
|
||||
*/
|
||||
@AutoService(InstrumentationModule.class)
|
||||
public class AkkaHttpServerRouteInstrumentationModule extends InstrumentationModule {
|
||||
public class AkkaHttpServerRouteInstrumentationModule extends InstrumentationModule
|
||||
implements ExperimentalInstrumentationModule {
|
||||
public AkkaHttpServerRouteInstrumentationModule() {
|
||||
super("akka-http", "akka-http-10.0", "akka-http-server", "akka-http-server-route");
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isIndyModule() {
|
||||
// AkkaHttpServerInstrumentationModule and AkkaHttpServerRouteInstrumentationModule share
|
||||
// AkkaRouteHolder class
|
||||
return false;
|
||||
public String getModuleGroup() {
|
||||
return "akka-http";
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
Loading…
Reference in New Issue