Class OpenTracingOptions.Builder

java.lang.Object
io.temporal.opentracing.OpenTracingOptions.Builder
Enclosing class:
OpenTracingOptions

public static final class OpenTracingOptions.Builder extends Object
  • Method Details

    • setTracer

      public OpenTracingOptions.Builder setTracer(@Nullable io.opentracing.Tracer tracer)
    • setSpanBuilderProvider

      public OpenTracingOptions.Builder setSpanBuilderProvider(@Nonnull SpanBuilderProvider spanBuilderProvider)
      Parameters:
      spanBuilderProvider - custom SpanBuilderProvider, allows for more control over how OpenTracing spans are created, named, and tagged.
      Returns:
      this
    • setSpanContextCodec

      public OpenTracingOptions.Builder setSpanContextCodec(@Nonnull OpenTracingSpanContextCodec spanContextCodec)
      Parameters:
      spanContextCodec - custom OpenTracingSpanContextCodec, allows for more control over how SpanContext is encoded and decoded from Map
      Returns:
      this
    • setIsErrorPredicate

      public OpenTracingOptions.Builder setIsErrorPredicate(@Nonnull Predicate<Throwable> isErrorPredicate)
      Parameters:
      isErrorPredicate - indicates whether the received exception should cause the OpenTracing span to finish in an error state or not. All exceptions will be logged to the span regardless, in order to provide a complete picture of the execution outcome. The "error" tag on the span will be set according to the value returned by this Predicate. By default, all exceptions will be considered errors.
      Returns:
      this
      See Also:
    • build

      public OpenTracingOptions build()