Skip to content

Commit 68e844e

Browse files
authored
Akka server indy support (#12243)
1 parent 32fd44e commit 68e844e

File tree

2 files changed

+13
-13
lines changed

2 files changed

+13
-13
lines changed

instrumentation/akka/akka-http-10.0/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/akkahttp/server/AkkaHttpServerInstrumentationModule.java

+8-8
Original file line numberDiff line numberDiff line change
@@ -11,29 +11,29 @@
1111
import com.google.auto.service.AutoService;
1212
import io.opentelemetry.javaagent.extension.instrumentation.InstrumentationModule;
1313
import io.opentelemetry.javaagent.extension.instrumentation.TypeInstrumentation;
14+
import io.opentelemetry.javaagent.extension.instrumentation.internal.ExperimentalInstrumentationModule;
1415
import java.util.List;
1516
import net.bytebuddy.matcher.ElementMatcher;
1617

1718
@AutoService(InstrumentationModule.class)
18-
public class AkkaHttpServerInstrumentationModule extends InstrumentationModule {
19+
public class AkkaHttpServerInstrumentationModule extends InstrumentationModule
20+
implements ExperimentalInstrumentationModule {
1921
public AkkaHttpServerInstrumentationModule() {
2022
super("akka-http", "akka-http-10.0", "akka-http-server");
2123
}
2224

25+
@Override
26+
public String getModuleGroup() {
27+
return "akka-http";
28+
}
29+
2330
@Override
2431
public ElementMatcher.Junction<ClassLoader> classLoaderMatcher() {
2532
// in GraphInterpreterInstrumentation we instrument a class that belongs to akka-streams, make
2633
// sure this runs only when akka-http is present to avoid muzzle failures
2734
return hasClassesNamed("akka.http.scaladsl.HttpExt");
2835
}
2936

30-
@Override
31-
public boolean isIndyModule() {
32-
// AkkaHttpServerInstrumentationModule and AkkaHttpServerRouteInstrumentationModule share
33-
// AkkaRouteHolder class
34-
return false;
35-
}
36-
3737
@Override
3838
public List<TypeInstrumentation> typeInstrumentations() {
3939
return asList(

instrumentation/akka/akka-http-10.0/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/akkahttp/server/route/AkkaHttpServerRouteInstrumentationModule.java

+5-5
Original file line numberDiff line numberDiff line change
@@ -10,23 +10,23 @@
1010
import com.google.auto.service.AutoService;
1111
import io.opentelemetry.javaagent.extension.instrumentation.InstrumentationModule;
1212
import io.opentelemetry.javaagent.extension.instrumentation.TypeInstrumentation;
13+
import io.opentelemetry.javaagent.extension.instrumentation.internal.ExperimentalInstrumentationModule;
1314
import java.util.List;
1415

1516
/**
1617
* This instrumentation applies to classes in akka-http.jar while
1718
* AkkaHttpServerInstrumentationModule applies to classes in akka-http-core.jar
1819
*/
1920
@AutoService(InstrumentationModule.class)
20-
public class AkkaHttpServerRouteInstrumentationModule extends InstrumentationModule {
21+
public class AkkaHttpServerRouteInstrumentationModule extends InstrumentationModule
22+
implements ExperimentalInstrumentationModule {
2123
public AkkaHttpServerRouteInstrumentationModule() {
2224
super("akka-http", "akka-http-10.0", "akka-http-server", "akka-http-server-route");
2325
}
2426

2527
@Override
26-
public boolean isIndyModule() {
27-
// AkkaHttpServerInstrumentationModule and AkkaHttpServerRouteInstrumentationModule share
28-
// AkkaRouteHolder class
29-
return false;
28+
public String getModuleGroup() {
29+
return "akka-http";
3030
}
3131

3232
@Override

0 commit comments

Comments
 (0)