Class AgentInstaller
- java.lang.Object
-
- io.opentelemetry.javaagent.tooling.AgentInstaller
-
public class AgentInstaller extends Object
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static InstrumentationgetInstrumentation()static voidinstallBytebuddyAgent(Instrumentation inst)static net.bytebuddy.agent.builder.ResettableClassFileTransformerinstallBytebuddyAgent(Instrumentation inst, Iterable<io.opentelemetry.javaagent.spi.ComponentInstaller> componentInstallers)Install the core bytebuddy agent along with all implementations ofInstrumentationModule.static voidregisterClassLoadCallback(String className, Runnable callback)Register a callback to run when a class is loading.
-
-
-
Method Detail
-
getInstrumentation
public static Instrumentation getInstrumentation()
-
installBytebuddyAgent
public static void installBytebuddyAgent(Instrumentation inst)
-
installBytebuddyAgent
public static net.bytebuddy.agent.builder.ResettableClassFileTransformer installBytebuddyAgent(Instrumentation inst, Iterable<io.opentelemetry.javaagent.spi.ComponentInstaller> componentInstallers)
Install the core bytebuddy agent along with all implementations ofInstrumentationModule.- Parameters:
inst- Java Instrumentation used to install bytebuddy- Returns:
- the agent's class transformer
-
registerClassLoadCallback
public static void registerClassLoadCallback(String className, Runnable callback)
Register a callback to run when a class is loading.Caveats:
- This callback will be invoked by a jvm class transformer.
- Classes filtered out by
AgentInstaller's skip list will not be matched.
- Parameters:
className- name of the class to match againstcallback- runnable to invoke when class name matches
-
-