Class ElasticApmAttacher


  • public class ElasticApmAttacher
    extends Object
    Attaches the Elastic Apm agent to the current or a remote JVM
    • Constructor Detail

      • ElasticApmAttacher

        public ElasticApmAttacher()
    • 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 on
        configuration - the agent configuration
      • attach

        public static void attach​(String pid,
                                  String agentArgs)
        Attaches the agent to a remote JVM
        Parameters:
        pid - the PID of the JVM the agent should be attached on
        agentArgs - the agent arguments