Package io.micronaut.tracing.jaeger
Class JaegerTracerFactory
java.lang.Object
io.micronaut.tracing.jaeger.JaegerTracerFactory
- All Implemented Interfaces:
Closeable,AutoCloseable
@Factory
@Requires(classes=io.jaegertracing.internal.JaegerTracer.Builder.class) @Requires(beans=JaegerConfiguration.class)
public class JaegerTracerFactory
extends Object
implements Closeable
Registers a Jaeger tracer based on the Jaeger configuration.
- Since:
- 1.0
- Author:
- graemerocher
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()protected voidcustomizeConfiguration(io.jaegertracing.Configuration configuration) Override in subclass to customize.voidsetReporter(@Nullable io.jaegertracing.spi.Reporter reporter) Sets a custom reporter.voidsetSampler(@Nullable io.jaegertracing.spi.Sampler sampler) Sets a custom sampler.voidsetScopeManager(@Nullable io.opentracing.ScopeManager scopeManager) Overrides the default MDCScopeManager with a custom scope manager.
-
Constructor Details
-
JaegerTracerFactory
- Parameters:
configuration- the configuration
-
-
Method Details
-
setReporter
@Inject public void setReporter(@Nullable @Nullable io.jaegertracing.spi.Reporter reporter) Sets a custom reporter.- Parameters:
reporter- the reporter
-
setSampler
@Inject public void setSampler(@Nullable @Nullable io.jaegertracing.spi.Sampler sampler) Sets a custom sampler.- Parameters:
sampler- the sampler
-
setScopeManager
@Inject public void setScopeManager(@Nullable @Nullable io.opentracing.ScopeManager scopeManager) Overrides the default MDCScopeManager with a custom scope manager.- Parameters:
scopeManager- the scope manager
-
close
@PreDestroy public void close()- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable
-
customizeConfiguration
protected void customizeConfiguration(io.jaegertracing.Configuration configuration) Override in subclass to customize.- Parameters:
configuration- the configuration
-