Package co.elastic.apm.attach
Class ElasticApmAttacher
- java.lang.Object
-
- co.elastic.apm.attach.ElasticApmAttacher
-
public class ElasticApmAttacher extends Object
Attaches the Elastic Apm agent to the current or a remote JVM
-
-
Constructor Summary
Constructors Constructor Description ElasticApmAttacher()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voidattach()Attaches the Elastic Apm agent to the current JVM.static voidattach(String pid, String agentArgs)Attaches the agent to a remote JVMstatic voidattach(String pid, Map<String,String> configuration)Attaches the agent to a remote JVMstatic voidattach(Map<String,String> configuration)Attaches the Elastic Apm agent to the current JVM.
-
-
-
Method Detail
-
attach
public static void attach()
Attaches the Elastic Apm agent to the current JVM.This method may only be invoked once.
- Throws:
IllegalStateException- if there was a problem while attaching the agent to this VM
-
attach
public static void attach(Map<String,String> configuration)
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
public static void attach(String pid, Map<String,String> configuration)
Attaches the agent to a remote JVM- Parameters:
pid- the PID of the JVM the agent should be attached onconfiguration- the agent configuration
-
-