Class HelperResources

java.lang.Object
io.opentelemetry.javaagent.bootstrap.HelperResources

public final class HelperResources extends Object
A holder of resources needed by instrumentation. We store them in the bootstrap class loader so instrumentation can store from the agent class loader and apps can retrieve from the app class loader.
  • Method Details

    • register

      public static void register(ClassLoader classLoader, String path, List<URL> urls)
      Registers the urls to be available to instrumentation at path, when given classLoader attempts to load that resource.
    • registerForAllClassLoaders

      public static void registerForAllClassLoaders(String path, List<URL> urls)
      Registers the urls to be available to instrumentation at path.
    • loadOne

      public static URL loadOne(ClassLoader classLoader, String path)
      Returns a URL that can be used to retrieve the content of the resource at path, or null if no resource could be found at path.
    • loadAll

      public static List<URL> loadAll(ClassLoader classLoader, String path)
      Returns all URLs that can be used to retrieve the content of the resource at path.