Package org.springframework.cloud.sleuth
Class ThreadLocalSpan
- java.lang.Object
-
- org.springframework.cloud.sleuth.ThreadLocalSpan
-
-
Constructor Summary
Constructors Constructor Description ThreadLocalSpan(Tracer tracer)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SpanAndScopeget()voidremove()Removes the current span from thread local and brings back the previous span to the current thread local.voidset(Span span)Sets given span and scope.
-
-
-
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.
-
-