Class BraveTracer.Builder

  • Enclosing class:
    BraveTracer

    public static final class BraveTracer.Builder
    extends Object
    • Method Detail

      • textMapPropagation

        public BraveTracer.Builder textMapPropagation​(io.opentracing.propagation.Format<io.opentracing.propagation.TextMap> format,
                                                      brave.propagation.Propagation<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);