Package io.temporal.opentracing
Class OpenTracingOptions.Builder
- java.lang.Object
-
- io.temporal.opentracing.OpenTracingOptions.Builder
-
- Enclosing class:
- OpenTracingOptions
public static final class OpenTracingOptions.Builder extends java.lang.Object
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description OpenTracingOptions
build()
OpenTracingOptions.Builder
setIsErrorPredicate(java.util.function.Predicate<java.lang.Throwable> isErrorPredicate)
OpenTracingOptions.Builder
setSpanBuilderProvider(SpanBuilderProvider spanBuilderProvider)
OpenTracingOptions.Builder
setSpanContextCodec(OpenTracingSpanContextCodec spanContextCodec)
OpenTracingOptions.Builder
setTracer(io.opentracing.Tracer tracer)
-
-
-
Method Detail
-
setTracer
public OpenTracingOptions.Builder setTracer(@Nullable io.opentracing.Tracer tracer)
-
setSpanBuilderProvider
public OpenTracingOptions.Builder setSpanBuilderProvider(@Nonnull SpanBuilderProvider spanBuilderProvider)
- Parameters:
spanBuilderProvider
- customSpanBuilderProvider
, 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
- customOpenTracingSpanContextCodec
, allows for more control over how SpanContext is encoded and decoded from Map- Returns:
- this
-
setIsErrorPredicate
public OpenTracingOptions.Builder setIsErrorPredicate(@Nonnull java.util.function.Predicate<java.lang.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:
- OpenTracing Documentation regarding error spans and logging exceptions.
-
build
public OpenTracingOptions build()
-
-