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
-
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
protected void
customizeConfiguration
(io.jaegertracing.Configuration configuration) Override in subclass to customize.void
setReporter
(@Nullable io.jaegertracing.spi.Reporter reporter) Sets a custom reporter.void
setSampler
(@Nullable io.jaegertracing.spi.Sampler sampler) Sets a custom sampler.void
setScopeManager
(@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:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
-
customizeConfiguration
protected void customizeConfiguration(io.jaegertracing.Configuration configuration) Override in subclass to customize.- Parameters:
configuration
- the configuration
-