public class IgnoredTracerContext extends Object implements AbstractTracerContext
IgnoredTracerContext represent a context should be ignored. So it just maintains the stack with an
integer depth field.
All operations through this will be ignored, and keep the memory and gc cost as low as possible.| Modifier and Type | Class and Description |
|---|---|
static class |
IgnoredTracerContext.ListenerManager |
| Constructor and Description |
|---|
IgnoredTracerContext() |
| Modifier and Type | Method and Description |
|---|---|
AbstractSpan |
activeSpan() |
void |
asyncStop(AsyncSpan span)
The given span could be stopped officially.
|
AbstractTracerContext |
awaitFinishAsync()
Notify this context, current span is going to be finished async in another thread.
|
ContextSnapshot |
capture()
Capture a snapshot for cross-thread propagation.
|
void |
continued(ContextSnapshot snapshot)
Build the reference between this segment and a cross-thread segment.
|
AbstractSpan |
createEntrySpan(String operationName)
Create an entry span
|
AbstractSpan |
createExitSpan(String operationName,
String remotePeer)
Create an exit span
|
AbstractSpan |
createLocalSpan(String operationName)
Create a local span
|
void |
extract(ContextCarrier carrier)
Build the reference between this segment and a cross-process segment.
|
String |
getReadableGlobalTraceId()
Get the global trace id, if needEnhance.
|
void |
inject(ContextCarrier carrier)
Prepare for the cross-process propagation.
|
boolean |
stopSpan(AbstractSpan span)
Finish the given span, and the given span should be the active span of current tracing context(stack)
|
public void inject(ContextCarrier carrier)
AbstractTracerContextinject in interface AbstractTracerContextcarrier - to carry the context for crossing process.public void extract(ContextCarrier carrier)
AbstractTracerContextextract in interface AbstractTracerContextcarrier - carried the context from a cross-process segment.public ContextSnapshot capture()
AbstractTracerContextcapture in interface AbstractTracerContextContextSnapshot , which includes the reference context.public void continued(ContextSnapshot snapshot)
AbstractTracerContextcontinued in interface AbstractTracerContextsnapshot - from AbstractTracerContext.capture() in the parent thread.public String getReadableGlobalTraceId()
AbstractTracerContextgetReadableGlobalTraceId in interface AbstractTracerContextpublic AbstractSpan createEntrySpan(String operationName)
AbstractTracerContextcreateEntrySpan in interface AbstractTracerContextoperationName - most likely a service namepublic AbstractSpan createLocalSpan(String operationName)
AbstractTracerContextcreateLocalSpan in interface AbstractTracerContextoperationName - most likely a local method signature, or business name.public AbstractSpan createExitSpan(String operationName, String remotePeer)
AbstractTracerContextcreateExitSpan in interface AbstractTracerContextoperationName - most likely a service name of remoteremotePeer - the network id(ip:port, hostname:port or ip1:port1,ip2,port, etc.)public AbstractSpan activeSpan()
activeSpan in interface AbstractTracerContextpublic boolean stopSpan(AbstractSpan span)
AbstractTracerContextstopSpan in interface AbstractTracerContextspan - to finishpublic AbstractTracerContext awaitFinishAsync()
AbstractTracerContextawaitFinishAsync in interface AbstractTracerContextpublic void asyncStop(AsyncSpan span)
AbstractTracerContextasyncStop in interface AbstractTracerContextspan - to be stopped.Copyright © 2019 The Apache Software Foundation. All rights reserved.