public class ServerSpanThreadBinder extends Object
| Constructor and Description |
|---|
ServerSpanThreadBinder(ServerSpanState state)
Creates a new instance.
|
| Modifier and Type | Method and Description |
|---|---|
ServerSpan |
getCurrentServerSpan()
This should be called in the thread in which the request was received before executing code in new threads.
|
void |
setCurrentSpan(ServerSpan span)
Binds given span to current thread.
|
public ServerSpanThreadBinder(ServerSpanState state)
state - Server span state, should not be null@Nullable public ServerSpan getCurrentServerSpan()
It returns the current server span which you can keep and bind to a new thread using
setCurrentSpan(ServerSpan).
setCurrentSpan(ServerSpan)public void setCurrentSpan(ServerSpan span)
span - Span to bind to current execution thread. Should not be null.Copyright © 2016. All rights reserved.