Interface IgnoreMatcherProvider


  • public interface IgnoreMatcherProvider
    IgnoreMatcherProvider can 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/services folder. Only a single implementation of this SPI can be provided.

    • 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.