|
@@ -5,12 +5,14 @@
|
|
|
|
|
|
package io.opentelemetry.javaagent.instrumentation.undertow;
|
|
|
|
|
|
+import static io.opentelemetry.javaagent.extension.matcher.AgentElementMatchers.hasClassesNamed;
|
|
|
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 java.util.List;
|
|
|
+import net.bytebuddy.matcher.ElementMatcher;
|
|
|
|
|
|
@AutoService(InstrumentationModule.class)
|
|
|
public class UndertowInstrumentationModule extends InstrumentationModule {
|
|
@@ -19,6 +21,12 @@ public class UndertowInstrumentationModule extends InstrumentationModule {
|
|
|
super("undertow", "undertow-1.4");
|
|
|
}
|
|
|
|
|
|
+ @Override
|
|
|
+ public ElementMatcher.Junction<ClassLoader> classLoaderMatcher() {
|
|
|
+ // class added in 1.4.0
|
|
|
+ return hasClassesNamed("io.undertow.Undertow$ListenerInfo");
|
|
|
+ }
|
|
|
+
|
|
|
@Override
|
|
|
public List<TypeInstrumentation> typeInstrumentations() {
|
|
|
return asList(
|