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 void
Call to this method is inserted intosun.launcher.LauncherHelper.checkAndLoadMain()
.static ClassLoader
static void
initialize
(Instrumentation inst, File javaagentFile, boolean fromPremain) static boolean
isAgentStarted
(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) 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:
true
if agent has started or not along with VM,false
otherwise.
-
getExtensionsClassLoader
-