ClientSpanState, CommonSpanState, LocalSpanState, ServerClientAndLocalSpanState, ServerSpanStatebrave.propagation.CurrentTraceContext@Deprecated public final class InheritableServerClientAndLocalSpanState extends java.lang.Object implements ServerClientAndLocalSpanState
ServerClientAndLocalSpanState implementation that keeps trace state using InheritableThreadLocal
variables and provides local span inheritence from parent to children.
Important note: when using InheritableServerClientAndLocalSpanState, tracers must
finish spans or clear the local span at
completion of the local trace span to avoid linking spans with incorrect
parents and avoid leaking spans and associated memory.
| Constructor | Description |
|---|---|
InheritableServerClientAndLocalSpanState(Endpoint endpoint) |
Deprecated.
|
| Modifier and Type | Method | Description |
|---|---|---|
Endpoint |
endpoint() |
Deprecated.
Gets the Endpoint (ip, port, service name) for this service.
|
Span |
getCurrentClientSpan() |
Deprecated.
Gets the Span for the client request that was started as part of current request.
|
Span |
getCurrentLocalSpan() |
Deprecated.
Gets the Span for the local request that was started as part of current request.
|
ServerSpan |
getCurrentServerSpan() |
Deprecated.
Never returns null:
setCurrentServerSpan(null) coerces to ServerSpan.EMPTY |
java.lang.Boolean |
sample() |
Deprecated.
|
void |
setCurrentClientSpan(Span span) |
Deprecated.
Sets current client span.
|
void |
setCurrentLocalSpan(Span span) |
Deprecated.
Sets the specified local span as the active span at the top of the
stack, or if the specified span is null, the top of the stack is popped.
|
void |
setCurrentServerSpan(ServerSpan span) |
Deprecated.
Set span for current request.
|
java.lang.String |
toString() |
Deprecated.
|
public InheritableServerClientAndLocalSpanState(Endpoint endpoint)
endpoint - Endpoint of the local service being traced.public ServerSpan getCurrentServerSpan()
setCurrentServerSpan(null) coerces to ServerSpan.EMPTYgetCurrentServerSpan in interface ServerSpanStatenull will be returned.public void setCurrentServerSpan(@Nullable ServerSpan span)
ServerSpanStatesetCurrentServerSpan in interface ServerSpanStatespan - Span for current request.public Endpoint endpoint()
CommonSpanStateendpoint in interface CommonSpanState@Nullable public Span getCurrentClientSpan()
ClientSpanStategetCurrentClientSpan in interface ClientSpanStatepublic void setCurrentClientSpan(@Nullable Span span)
ClientSpanStatesetCurrentClientSpan in interface ClientSpanStatespan - Client span.public java.lang.Boolean sample()
sample in interface CommonSpanStatepublic Span getCurrentLocalSpan()
LocalSpanStategetCurrentLocalSpan in interface LocalSpanStatepublic void setCurrentLocalSpan(@Nullable Span span)
setCurrentLocalSpan in interface LocalSpanStatespan - Local span.public java.lang.String toString()
toString in class java.lang.ObjectCopyright © 2018 OpenZipkin. All rights reserved.