Package co.elastic.apm.attach
Class ElasticApmAttacher
java.lang.Object
co.elastic.apm.attach.ElasticApmAttacher
Attaches the Elastic Apm agent to the current or a remote JVM
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidattach()Attaches the Elastic Apm agent to the current JVM.static voidAttaches the Elastic Apm agent to the current JVM.static voidDeprecated.static voidAttaches the agent to a remote JVMstatic voidAttaches the agent to a remote JVMstatic voidAttaches the Elastic Apm agent to the current JVM.static File
-
Constructor Details
-
ElasticApmAttacher
public ElasticApmAttacher()
-
-
Method Details
-
attach
public static void attach()Attaches the Elastic Apm agent to the current JVM.This method may only be invoked once.
Tries to load
elasticapm.propertiesfrom the classpath, if exists.- Throws:
IllegalStateException- if there was a problem while attaching the agent to this VM
-
attach
Attaches the Elastic Apm agent to the current JVM.This method may only be invoked once.
- Parameters:
propertiesLocation- the location within the classpath which contains the agent configuration properties file- Throws:
IllegalStateException- if there was a problem while attaching the agent to this VM- Since:
- 1.11.0
-
attach
Attaches the Elastic Apm agent to the current JVM.This method may only be invoked once.
- Parameters:
configuration- the agent configuration- Throws:
IllegalStateException- if there was a problem while attaching the agent to this VM
-
attach
Attaches the agent to a remote JVM- Parameters:
pid- the PID of the JVM the agent should be attached onconfiguration- the agent configuration
-
attach
Attaches the agent to a remote JVM- Parameters:
pid- the PID of the JVM the agent should be attached onconfiguration- the agent configurationagentJarFile- the agent jar file
-
attach
Deprecated.Attaches the agent to a remote JVM- Parameters:
pid- the PID of the JVM the agent should be attached onagentArgs- the agent arguments
-
getBundledAgentJarFile
-
attach(String, Map)