Package co.elastic.apm.agent.premain
THIS PACKAGE MUST HAVE NO DEPENDENCY ON ANYTHING!
It contains the minimal code required to bootstrap the agent without causing any implicit initializations of anything related to the agent, including agent classes loading and linkage. The bootstrap sequence includes:-
bootstrap checks to abort initialization if required (can be disabled through the
elastic.apm.disable_bootstrap_checks
System property). -
load the
co.elastic.apm.agent.bci.ElasticApmAgent
class and execute the agent initialization process through reflection. This can be done synchronously, blocking the bootstrapping thread, or asynchronously on a different thread after some delay, that may be configured through theelastic.apm.delay_agent_premain_ms
System property.
-
Interface Summary Interface Description BootstrapCheck A check that gets executed when the agent starts up. -
Class Summary Class Description AgentMain This class is loaded by the system classloader, It extracts the apm-agent.jar and loads it in an isolated class loader hierarchy.BootstrapCheck.BootstrapCheckResult JavaVersionBootstrapCheck Gracefully abort agent startup is better than unexpected failure down the road when we known a given JVM version is not supported.ShadedClassLoader A class loader that loads shaded class files form a jar file.VerifyNoneBootstrapCheck