Class ThreadLocalSpan


  • public class ThreadLocalSpan
    extends Object
    Represents a Span stored in thread local.
    Since:
    3.1.0
    Author:
    Marcin Grzejszczak
    • Constructor Detail

      • ThreadLocalSpan

        public ThreadLocalSpan​(Tracer tracer)
    • Method Detail

      • set

        public void set​(Span span)
        Sets given span and scope.
        Parameters:
        span - - span to be put in scope
      • get

        public SpanAndScope get()
        Returns:
        currently stored span and scope
      • remove

        public void remove()
        Removes the current span from thread local and brings back the previous span to the current thread local.