Class BraveTracer.Builder

java.lang.Object
brave.opentracing.BraveTracer.Builder
Enclosing class:
BraveTracer

public static final class BraveTracer.Builder
extends java.lang.Object
  • Method Summary

    Modifier and Type Method Description
    BraveTracer build()  
    BraveTracer.Builder textMapPropagation​(io.opentracing.propagation.Format<io.opentracing.propagation.TextMap> format, brave.propagation.Propagation<java.lang.String> propagation)
    By default, Format.Builtin.HTTP_HEADERS and Format.Builtin.TEXT_MAP use the propagation mechanism supplied by Tracing.propagation(), which defaults to B3 Propagation.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • textMapPropagation

      public BraveTracer.Builder textMapPropagation​(io.opentracing.propagation.Format<io.opentracing.propagation.TextMap> format, brave.propagation.Propagation<java.lang.String> propagation)
      By default, Format.Builtin.HTTP_HEADERS and Format.Builtin.TEXT_MAP use the propagation mechanism supplied by Tracing.propagation(), which defaults to B3 Propagation. You can override or add different formats using this method.

      For example, instead of using implicit format keys in your code, you might want to explicitly declare you are using B3. To do so, you'd do setup the tracer like this:

      
       builder.textMapPropagation(MyFormats.B3, Propagation.B3_STRING);
      
       // later, you can ensure B3 is used like this:
       tracer.extract(MyFormats.B3, textMap);
       
    • build

      public BraveTracer build()