Class ApmServerConfigurationSource

  • All Implemented Interfaces:
    LifecycleListener, org.stagemonitor.configuration.source.ConfigurationSource

    public class ApmServerConfigurationSource
    extends org.stagemonitor.configuration.source.AbstractConfigurationSource
    implements LifecycleListener
    • Method Detail

      • reload

        public void reload()
        We want to reload the configuration in intervals which are determined based on the Cache-Control header from the APM Server That's why we can't rely on the general ConfigurationRegistry scheduled reload
        Specified by:
        reload in interface org.stagemonitor.configuration.source.ConfigurationSource
        Overrides:
        reload in class org.stagemonitor.configuration.source.AbstractConfigurationSource
      • 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
      • getValue

        public java.lang.String getValue​(java.lang.String key)
        Specified by:
        getValue in interface org.stagemonitor.configuration.source.ConfigurationSource
      • getName

        public java.lang.String getName()
        Specified by:
        getName in interface org.stagemonitor.configuration.source.ConfigurationSource
      • pause

        public void pause()
        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
      • resume

        public void resume()
        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