Package co.elastic.apm.agent.impl
Class ElasticApmTracerBuilder
- java.lang.Object
-
- co.elastic.apm.agent.impl.ElasticApmTracerBuilder
-
public class ElasticApmTracerBuilder extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description ElasticApmTracerBuilder()Constructs a new builder instance with default configuration sourcesElasticApmTracerBuilder(java.util.List<org.stagemonitor.configuration.source.ConfigurationSource> configSources)Constructs a new builder instance
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description ElasticApmTracerbuild()ElasticApmTracerbuildAndStart()NOTE: THIS IS A CONVENIENCE METHOD ONLY TO BE USED WITHIN TESTSElasticApmTracerBuilderconfigurationRegistry(org.stagemonitor.configuration.ConfigurationRegistry configurationRegistry)static java.util.List<org.stagemonitor.configuration.source.ConfigurationSource>getConfigSources(java.lang.String agentArguments)Provides an ordered list of local configuration sources, sorted in decreasing priority (first wins)ElasticApmTracerBuilderreporter(Reporter reporter)ElasticApmTracerBuilderwithLifecycleListener(LifecycleListener listener)ElasticApmTracerBuilderwithObjectPoolFactory(ObjectPoolFactory objectPoolFactory)
-
-
-
Constructor Detail
-
ElasticApmTracerBuilder
public ElasticApmTracerBuilder()
Constructs a new builder instance with default configuration sources
-
ElasticApmTracerBuilder
public ElasticApmTracerBuilder(java.util.List<org.stagemonitor.configuration.source.ConfigurationSource> configSources)
Constructs a new builder instance- Parameters:
configSources- configuration sources, obtained from callinggetConfigSources(String)
-
-
Method Detail
-
configurationRegistry
public ElasticApmTracerBuilder configurationRegistry(org.stagemonitor.configuration.ConfigurationRegistry configurationRegistry)
-
reporter
public ElasticApmTracerBuilder reporter(Reporter reporter)
-
withObjectPoolFactory
public ElasticApmTracerBuilder withObjectPoolFactory(ObjectPoolFactory objectPoolFactory)
-
withLifecycleListener
public ElasticApmTracerBuilder withLifecycleListener(LifecycleListener listener)
-
build
public ElasticApmTracer build()
-
buildAndStart
public ElasticApmTracer buildAndStart()
NOTE: THIS IS A CONVENIENCE METHOD ONLY TO BE USED WITHIN TESTS- Returns:
- the built and started tracer
-
getConfigSources
public static java.util.List<org.stagemonitor.configuration.source.ConfigurationSource> getConfigSources(@Nullable java.lang.String agentArguments)Provides an ordered list of local configuration sources, sorted in decreasing priority (first wins)- Parameters:
agentArguments- agent arguments (if any)- Returns:
- ordered list of configuration sources
-
-