Package io.micrometer.tracing
Class ThreadLocalSpan
java.lang.Object
io.micrometer.tracing.ThreadLocalSpan
Represents a
Span stored in thread local.- Since:
- 1.0.0
-
Constructor Details
-
ThreadLocalSpan
Creates a new instance ofThreadLocalSpan.- Parameters:
tracer- tracer
-
-
Method Details
-
set
Sets given span and scope.- Parameters:
span- - span to be put in scope
-
get
Returns the currently stored span and scope.- Returns:
- span and scope
-
remove
Removes the current span from thread local and brings back the previous span to the current thread local.- Returns:
- removed span of
nullif there was none
-