Package datadog.trace.bootstrap
Class AgentBootstrap
java.lang.Object
datadog.trace.bootstrap.AgentBootstrap
Entry point for initializing the agent.
The bootstrap process of the agent is somewhat complicated and care has to be taken to make sure things do not get broken by accident.
JVM loads this class onto app's classloader, afterwards agent needs to inject its classes onto bootstrap classpath. This leads to this class being visible on bootstrap. This in turn means that this class may be loaded again on bootstrap by accident if we ever reference it after bootstrap has been setup.
In order to avoid this we need to make sure we do a few things:
- Do as little as possible here
- Never reference this class after we have setup bootstrap and jumped over to 'real' agent code
- Do not store any static data in this class
- Do dot touch any logging facilities here so we can configure them later
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidagentmain(String agentArgs, Instrumentation inst) static voidstatic voidpremain(String agentArgs, Instrumentation inst)
-
Constructor Details
-
AgentBootstrap
public AgentBootstrap()
-
-
Method Details
-
premain
-
agentmain
-
main
-