Class DefaultQueryBusSpanFactory.Builder

java.lang.Object
org.axonframework.messaging.queryhandling.tracing.DefaultQueryBusSpanFactory.Builder
Enclosing class:
DefaultQueryBusSpanFactory

public static class DefaultQueryBusSpanFactory.Builder extends Object
Builder class to instantiate a DefaultQueryBusSpanFactory. The default values are:
  • distributedInSameTrace defaults to true
The spanFactory is a required field and should be provided.
  • Constructor Details

    • Builder

      public Builder()
  • Method Details

    • spanFactory

      public DefaultQueryBusSpanFactory.Builder spanFactory(SpanFactory spanFactory)
      Sets the SpanFactory to use to create the spans. This is a required field.
      Parameters:
      spanFactory - The SpanFactory to use to create the spans.
      Returns:
      The current Builder instance, for fluent interfacing.
    • distributedInSameTrace

      public DefaultQueryBusSpanFactory.Builder distributedInSameTrace(boolean distributedInSameTrace)
      Sets whether the distributed query should be in the same trace as the parent. Defaults to true.
      Parameters:
      distributedInSameTrace - whether the distributed query should be in the same trace as the parent.
      Returns:
      The current Builder instance, for fluent interfacing.
    • validate

      protected void validate()
      Validates whether the fields contained in this builder are set accordingly.
    • build

      Initializes a DefaultQueryBusSpanFactory as specified through this Builder.
      Returns:
      The DefaultQueryBusSpanFactory as specified through this Builder.