public final class ClientSpanThreadBinder extends Object
ClientTracer.startNewSpan(String), call getCurrentClientSpan() and save the result to pass to the
callback method (e.g., local final variable)
In the callback method, call setCurrentSpan(com.twitter.zipkin.gen.Span) before calling ClientTracer.setClientReceived()| Constructor and Description |
|---|
ClientSpanThreadBinder(ClientSpanState state)
Creates a new instance.
|
| Modifier and Type | Method and Description |
|---|---|
Span |
getCurrentClientSpan()
This should be called in the thread in which the client request made after starting new client span.
|
void |
setCurrentSpan(Span span)
Binds given span to current thread.
|
public ClientSpanThreadBinder(ClientSpanState state)
state - client span state, should not be nullpublic Span getCurrentClientSpan()
It returns the current client span which you can keep and bind to the callback thread
setCurrentSpan(Span)public void setCurrentSpan(Span span)
ClientTracer.setClientReceived()span - Span to bind to current execution thread. Should not be null.Copyright © 2016. All rights reserved.