Class AgentInitializer
java.lang.Object
io.opentelemetry.javaagent.bootstrap.AgentInitializer
Agent start up logic.
This class is loaded and called by io.opentelemetry.javaagent.OpenTelemetryAgent
The intention is for this class to be loaded by bootstrap class loader to make sure we have unimpeded access to the rest of agent parts.
-
Method Summary
Modifier and TypeMethodDescriptionstatic voidCall to this method is inserted intosun.launcher.LauncherHelper.checkAndLoadMain().static ClassLoaderstatic voidinitialize(Instrumentation inst, File javaagentFile, boolean fromPremain, String agentArgs) static booleanisAgentStarted(boolean vmStarted) Check whether agent has started or not along with VM.
-
Method Details
-
initialize
public static void initialize(Instrumentation inst, File javaagentFile, boolean fromPremain, @Nullable String agentArgs) throws Exception - Throws:
Exception
-
delayedStartHook
Call to this method is inserted intosun.launcher.LauncherHelper.checkAndLoadMain().- Throws:
Exception
-
isAgentStarted
public static boolean isAgentStarted(boolean vmStarted) Check whether agent has started or not along with VM.This method is used by io.opentelemetry.javaagent.tooling.AgentStarterImpl#InetAddressClassFileTransformer internally to check whether agent has started.
- Parameters:
vmStarted- flag about whether VM has started or not.- Returns:
trueif agent has started or not along with VM,falseotherwise.
-
getExtensionsClassLoader
-