Class BraveTracerConfiguration

java.lang.Object
io.micronaut.tracing.brave.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 Object implements io.micronaut.core.util.Toggleable
Configuration properties for Brave.
Since:
1.0
Author:
graemerocher
  • Field Details

    • PREFIX

      public static final String PREFIX
      See Also:
    • DEFAULT_SAMPLER_PROBABILITY

      public static final float DEFAULT_SAMPLER_PROBABILITY
      See Also:
    • DEFAULT_ENABLED

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

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

    • BraveTracerConfiguration

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

    • 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
    • setSamplerConfiguration

      @Inject public void setSamplerConfiguration(@Nullable @Nullable BraveTracerConfiguration.SamplerConfiguration samplerConfiguration)
      Parameters:
      samplerConfiguration - the configuration
    • getTracingBuilder

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

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

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

      @Inject public void setClock(@Nullable @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