Class AbstractLifecycleListener

    • Constructor Detail

      • AbstractLifecycleListener

        public AbstractLifecycleListener()
    • Method Detail

      • init

        public void init​(ElasticApmTracer tracer)
                  throws java.lang.Exception
        Description copied from interface: LifecycleListener
        Callback for tracer initialization. As opposed to LifecycleListener.start(ElasticApmTracer), which may be called in a delay, this callback is called at the bootstrap of the JVM, before anything else start. This may be useful for listeners that need to operate very early on, for example such that setup class loading requirement to support OSGi systems.
        Specified by:
        init in interface LifecycleListener
        Parameters:
        tracer - the tracer
        Throws:
        java.lang.Exception
      • pause

        public void pause()
                   throws java.lang.Exception
        Description copied from interface: LifecycleListener
        Callback for when ElasticApmTracer.pause() has been called.

        Typically, this method is used to reduce overhead on the application to a minimum. This can be done by cleaning up resources like object pools, as well as by avoiding tracing-related overhead.

        Exceptions thrown from this method are caught and handled so that they don't prevent further cleanup actions.

        Specified by:
        pause in interface LifecycleListener
        Throws:
        java.lang.Exception - When something goes wrong performing the cleanup.
      • resume

        public void resume()
                    throws java.lang.Exception
        Description copied from interface: LifecycleListener
        Callback for when ElasticApmTracer.resume() has been called.

        Typically, used in order to revert the actions taken by the LifecycleListener.pause() method, allowing the agent to restore all tracing capabilities

        Exceptions thrown from this method are caught and handled so that they don't prevent further resume actions.

        Specified by:
        resume in interface LifecycleListener
        Throws:
        java.lang.Exception - When something goes wrong while attempting to resume.