`classLoaderOptimization` is not needed when matching by name (#8010)
This commit is contained in:
parent
ff73e9577c
commit
6c5351305c
|
@ -5,7 +5,6 @@
|
||||||
|
|
||||||
package io.opentelemetry.javaagent.instrumentation.oshi;
|
package io.opentelemetry.javaagent.instrumentation.oshi;
|
||||||
|
|
||||||
import static io.opentelemetry.javaagent.extension.matcher.AgentElementMatchers.hasClassesNamed;
|
|
||||||
import static net.bytebuddy.matcher.ElementMatchers.isMethod;
|
import static net.bytebuddy.matcher.ElementMatchers.isMethod;
|
||||||
import static net.bytebuddy.matcher.ElementMatchers.isPublic;
|
import static net.bytebuddy.matcher.ElementMatchers.isPublic;
|
||||||
import static net.bytebuddy.matcher.ElementMatchers.isStatic;
|
import static net.bytebuddy.matcher.ElementMatchers.isStatic;
|
||||||
|
@ -18,11 +17,6 @@ import net.bytebuddy.description.type.TypeDescription;
|
||||||
import net.bytebuddy.matcher.ElementMatcher;
|
import net.bytebuddy.matcher.ElementMatcher;
|
||||||
|
|
||||||
public class SystemInfoInstrumentation implements TypeInstrumentation {
|
public class SystemInfoInstrumentation implements TypeInstrumentation {
|
||||||
@Override
|
|
||||||
public ElementMatcher<ClassLoader> classLoaderOptimization() {
|
|
||||||
return hasClassesNamed("oshi.SystemInfo");
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ElementMatcher<TypeDescription> typeMatcher() {
|
public ElementMatcher<TypeDescription> typeMatcher() {
|
||||||
return named("oshi.SystemInfo");
|
return named("oshi.SystemInfo");
|
||||||
|
|
Loading…
Reference in New Issue