public class ExitSpan extends StackBasedTracingSpan implements WithPeerInfo
ExitSpan represents a service consumer point, such as Feign, Okhttp client for an Http service.
It is an exit point or a leaf span(our old name) of trace tree. In a single rpc call, because of a combination of
discovery libs, there maybe contain multi-layer exit point:
The ExitSpan only presents the first one.
Such as: Dubbox - Apache Httpcomponent - ...(Remote) The ExitSpan represents the Dubbox span, and ignore
the httpcomponent span's info.peer, peerId, stackDepthcomponentId, componentName, context, endTime, errorOccurred, isInAsyncMode, layer, logs, operationId, operationName, parentSpanId, refs, spanId, startTime, tags| Constructor and Description |
|---|
ExitSpan(int spanId,
int parentSpanId,
int operationId,
int peerId) |
ExitSpan(int spanId,
int parentSpanId,
int operationId,
String peer) |
ExitSpan(int spanId,
int parentSpanId,
String operationName,
int peerId) |
ExitSpan(int spanId,
int parentSpanId,
String operationName,
String peer) |
| Modifier and Type | Method and Description |
|---|---|
String |
getPeer() |
int |
getPeerId() |
boolean |
isEntry() |
boolean |
isExit() |
ExitSpan |
log(Throwable t)
Record an exception event of the current walltime timestamp.
|
AbstractTracingSpan |
setComponent(Component component)
Set the component of this span, with internal supported.
|
AbstractTracingSpan |
setComponent(String componentName)
Set the component name.
|
AbstractTracingSpan |
setLayer(SpanLayer layer) |
AbstractTracingSpan |
setOperationId(int operationId)
Set the operation id, which compress by the name.
|
AbstractTracingSpan |
setOperationName(String operationName)
Set the operation name, just because these is not compress dictionary value for this name.
|
ExitSpan |
start()
Set the
AbstractTracingSpan.startTime, when the first start, which means the first service provided. |
AbstractTracingSpan |
tag(AbstractTag tag,
String value) |
ExitSpan |
tag(String key,
String value)
Set a key:value tag on the Span.
|
finish, setPeer, transformasyncFinish, errorOccurred, getOperationId, getOperationName, getSpanId, log, prepareForAsync, ref, startpublic ExitSpan(int spanId,
int parentSpanId,
int operationId,
int peerId)
public ExitSpan(int spanId,
int parentSpanId,
int operationId,
String peer)
public ExitSpan(int spanId,
int parentSpanId,
String operationName,
int peerId)
public ExitSpan start()
AbstractTracingSpan.startTime, when the first start, which means the first service provided.start in interface AbstractSpanstart in class AbstractTracingSpanpublic ExitSpan tag(String key, String value)
AbstractTracingSpantag in interface AbstractSpantag in class AbstractTracingSpanpublic AbstractTracingSpan tag(AbstractTag tag, String value)
tag in interface AbstractSpantag in class AbstractTracingSpanpublic AbstractTracingSpan setLayer(SpanLayer layer)
setLayer in interface AbstractSpansetLayer in class AbstractTracingSpanpublic AbstractTracingSpan setComponent(Component component)
AbstractTracingSpansetComponent in interface AbstractSpansetComponent in class AbstractTracingSpanpublic AbstractTracingSpan setComponent(String componentName)
AbstractTracingSpansetComponent in interface AbstractSpansetComponent in class AbstractTracingSpanpublic ExitSpan log(Throwable t)
AbstractTracingSpanlog in interface AbstractSpanlog in class AbstractTracingSpant - any subclass of Throwable, which occurs in this span.public AbstractTracingSpan setOperationName(String operationName)
AbstractTracingSpansetOperationName in interface AbstractSpansetOperationName in class AbstractTracingSpanpublic AbstractTracingSpan setOperationId(int operationId)
AbstractTracingSpansetOperationId in interface AbstractSpansetOperationId in class AbstractTracingSpanpublic int getPeerId()
getPeerId in interface WithPeerInfopublic String getPeer()
getPeer in interface WithPeerInfopublic boolean isEntry()
isEntry in interface AbstractSpanpublic boolean isExit()
isExit in interface AbstractSpanCopyright © 2019 The Apache Software Foundation. All rights reserved.