Class BraveTracerConfiguration

  • All Implemented Interfaces:
    io.micronaut.core.util.Toggleable

    @Requires(classes=brave.Tracing.class) @Requires(property="tracing.zipkin.enabled",value="true")
    @ConfigurationProperties("tracing.zipkin")
    public class BraveTracerConfiguration
    extends java.lang.Object
    implements io.micronaut.core.util.Toggleable
    Configuration properties for Brave.
    Since:
    1.0
    • Field Detail

      • DEFAULT_SAMPLER_PROBABILITY

        public static final float DEFAULT_SAMPLER_PROBABILITY
        See Also:
        Constant Field Values
      • DEFAULT_ENABLED

        public static final boolean DEFAULT_ENABLED
        The default enable value.
        See Also:
        Constant Field Values
      • tracingBuilder

        @ConfigurationBuilder(prefixes="",
                              excludes={"errorParser","clock","endpoint","spanReporter","propagationFactory","currentTraceContext","sampler"})
        protected brave.Tracing.Builder tracingBuilder
    • Constructor Detail

      • BraveTracerConfiguration

        public BraveTracerConfiguration​(io.micronaut.runtime.ApplicationConfiguration configuration)
        Constructs a new BraveTracerConfiguration.
        Parameters:
        configuration - the application configuration
    • Method Detail

      • isEnabled

        public boolean isEnabled()
        Specified by:
        isEnabled in interface io.micronaut.core.util.Toggleable
        Returns:
        true if enabled
      • setEnabled

        public void setEnabled​(boolean enabled)
        Default value (false).
        Parameters:
        enabled - true if tracing is enabled
      • getTracingBuilder

        public brave.Tracing.Builder getTracingBuilder()
        Returns:
        the builder
      • setSampler

        @Inject
        public void setSampler​(@Nullable
                               brave.sampler.Sampler sampler)
        Parameters:
        sampler - the sampler
      • setErrorParser

        @Inject
        public void setErrorParser​(@Nullable
                                   brave.ErrorParser errorParser)
        Parameters:
        errorParser - the parser
      • setPropagationFactory

        @Inject
        public void setPropagationFactory​(@Nullable
                                          brave.propagation.Propagation.Factory propagationFactory)
        Parameters:
        propagationFactory - the factory
      • setClock

        @Inject
        public void setClock​(@Nullable
                             brave.Clock clock)
        Parameters:
        clock - the clock
      • setCurrentTraceContext

        @Inject
        public void setCurrentTraceContext​(brave.propagation.CurrentTraceContext traceContext)
        Sets the current trace context.
        Parameters:
        traceContext - the context