Class BraveSpanBuilder

  • All Implemented Interfaces:
    io.opentracing.Tracer.SpanBuilder

    public class BraveSpanBuilder
    extends Object
    implements io.opentracing.Tracer.SpanBuilder
    Uses by the underlying Tracer to create a BraveSpan wrapped Span

    Indicate Tags.SPAN_KIND before calling start() to ensure RPC spans are identified properly.

    Brave does not support multiple parents so this has been implemented to use the first parent defined.

    • Method Detail

      • asChildOf

        public BraveSpanBuilder asChildOf​(io.opentracing.SpanContext parent)
        Specified by:
        asChildOf in interface io.opentracing.Tracer.SpanBuilder
      • asChildOf

        public BraveSpanBuilder asChildOf​(io.opentracing.Span parent)
        Specified by:
        asChildOf in interface io.opentracing.Tracer.SpanBuilder
      • addReference

        public BraveSpanBuilder addReference​(String type,
                                             io.opentracing.SpanContext context)
        Specified by:
        addReference in interface io.opentracing.Tracer.SpanBuilder
      • withTag

        public BraveSpanBuilder withTag​(String key,
                                        String value)
        Specified by:
        withTag in interface io.opentracing.Tracer.SpanBuilder
      • withTag

        public BraveSpanBuilder withTag​(String key,
                                        boolean value)
        Specified by:
        withTag in interface io.opentracing.Tracer.SpanBuilder
      • withTag

        public BraveSpanBuilder withTag​(String key,
                                        Number value)
        Specified by:
        withTag in interface io.opentracing.Tracer.SpanBuilder
      • withTag

        public <T> BraveSpanBuilder withTag​(io.opentracing.tag.Tag<T> tag,
                                            T value)
        Specified by:
        withTag in interface io.opentracing.Tracer.SpanBuilder
      • withStartTimestamp

        public BraveSpanBuilder withStartTimestamp​(long microseconds)
        Specified by:
        withStartTimestamp in interface io.opentracing.Tracer.SpanBuilder
      • ignoreActiveSpan

        public BraveSpanBuilder ignoreActiveSpan()
        Specified by:
        ignoreActiveSpan in interface io.opentracing.Tracer.SpanBuilder
      • start

        public BraveSpan start()
        Specified by:
        start in interface io.opentracing.Tracer.SpanBuilder
      • startManual

        @Deprecated
        public BraveSpan startManual()
        Deprecated.
        Specified by:
        startManual in interface io.opentracing.Tracer.SpanBuilder
      • startActive

        @Deprecated
        public BraveScope startActive​(boolean finishSpanOnClose)
        Deprecated.
        Specified by:
        startActive in interface io.opentracing.Tracer.SpanBuilder