Package io.opentelemetry.javaagent.spi
Interface IgnoreMatcherProvider
-
public interface IgnoreMatcherProviderIgnoreMatcherProvidercan be used to ignore (or allow) types (e.g. classes or classloaders) from being instrumented. OpenTelemetry agent by default ignores specific set of classes (e.g.org.gradle.*) and classloaders. This is mainly done to improve startup time, but also to explicitly disable instrumentation of a specific types (e.g. other agents). An implementation of this class can be used to override this behaviour.This is a service provider interface that requires implementations to be registered in
META-INF/servicesfolder. Only a single implementation of this SPI can be provided.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classIgnoreMatcherProvider.ResultResult of the ignore evaluation.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description IgnoreMatcherProvider.Resultclassloader(ClassLoader classLoader)Whether to ignore (or allow) classloader.IgnoreMatcherProvider.Resulttype(net.bytebuddy.description.type.TypeDescription target)Whether to ignore (or allow) type.
-
-
-
Method Detail
-
type
IgnoreMatcherProvider.Result type(net.bytebuddy.description.type.TypeDescription target)
Whether to ignore (or allow) type. This method is called for every class, therefore the implementation has to be as efficient as possible.- Parameters:
target- a class.- Returns:
- the result of the ignore evaluation.
-
classloader
IgnoreMatcherProvider.Result classloader(ClassLoader classLoader)
Whether to ignore (or allow) classloader. This method is called for every classloader, therefore the implementation has to be as efficient as possible.- Parameters:
classLoader- a classloader.- Returns:
- the result of the ignore evaluation.
-
-