-
- All Implemented Interfaces:
-
com.datadog.trace.api.gateway.IGSpanInfo,com.datadog.trace.api.interceptor.MutableSpan,com.datadog.trace.bootstrap.instrumentation.api.AgentSpan
public final class AgentTracer.NoopAgentSpan implements AgentSpan
-
-
Field Summary
Fields Modifier and Type Field Description public final static AgentTracer.NoopAgentSpanINSTANCE
-
Method Summary
Modifier and Type Method Description DDTraceIdgetTraceId()longgetSpanId()AgentSpansetTag(String key, boolean value)voidsetRequestBlockingAction(Flow.Action.RequestBlockingAction rba)Flow.Action.RequestBlockingActiongetRequestBlockingAction()AgentSpansetTag(String tag, Number value)booleanisError()AgentSpansetTag(String key, int value)AgentSpansetTag(String key, long value)AgentSpansetTag(String key, double value)AgentSpansetTag(String key, Object value)AgentSpansetMetric(CharSequence key, int value)AgentSpansetMetric(CharSequence key, long value)AgentSpansetMetric(CharSequence key, double value)ObjectgetTag(String key)longgetStartTime()longgetDurationNano()StringgetOperationName()AgentSpansetOperationName(CharSequence serviceName)StringgetServiceName()AgentSpansetServiceName(String serviceName)CharSequencegetResourceName()AgentSpansetResourceName(CharSequence resourceName)AgentSpansetResourceName(CharSequence resourceName, byte priority)Implementation note: two calls with the same priority will result in the second resource namebeing used booleaneligibleForDropping()RequestContextgetRequestContext()RequestContext for the Instrumentation Gateway IntegerforceSamplingDecision()AgentSpansetSamplingPriority(int newPriority, int samplingMechanism)IntegergetSamplingPriority()AgentSpansetSamplingPriority(int newPriority)StringgetSpanType()AgentSpansetSpanType(CharSequence type)Map<String, Object>getTags()AgentSpansetTag(String key, String value)AgentSpansetTag(String key, CharSequence value)AgentSpansetError(boolean error)AgentSpansetError(boolean error, byte priority)AgentSpansetMeasured(boolean measured)AgentSpangetRootSpan()AgentSpansetErrorMessage(String errorMessage)AgentSpanaddThrowable(Throwable throwable)AgentSpanaddThrowable(Throwable throwable, byte errorPriority)AgentSpansetHttpStatusCode(int statusCode)shortgetHttpStatusCode()AgentSpangetLocalRootSpan()Returns the root span for current the trace fragment. booleanisSameTrace(AgentSpan otherSpan)AgentSpan.Contextcontext()StringgetBaggageItem(String key)AgentSpansetBaggageItem(String key, String value)voidfinish()voidfinish(long finishMicros)voidfinishWithDuration(long durationNanos)voidbeginEndToEnd()Marks the start of a message pipeline where we want to track end-to-end processing time. voidfinishWithEndToEnd()Marks the end of a message pipeline where the final end-to-end processing time is recorded. booleanphasedFinish()Finishes the span but does not publish it. voidpublish()Publish a span that was previously finished by calling phasedFinish. StringgetSpanName()voidsetSpanName(CharSequence spanName)booleanhasResourceName()Deprecated in favor of setResourceName(final CharSequence resourceName, byte priority) or usinggetResourceNamePriority() for comparisons. bytegetResourceNamePriority()TraceConfigtraceConfig()voidaddLink(AgentSpanLink link)-
Methods inherited from class com.datadog.trace.bootstrap.instrumentation.api.AgentSpan
addThrowable, finish, finishWithDuration, getBaggageItem, getSpanName, getTag, isSameTrace, setBaggageItem, setError, setErrorMessage, setMetric, setMetric, setMetric, setSamplingPriority, setSpanName, setTag, setTag, setTag, setTag, setTag, setTag, setTag, setTag -
Methods inherited from class com.datadog.trace.api.interceptor.MutableSpan
getLocalRootSpan, getOperationName, getRootSpan, setError, setMetric, setMetric, setMetric, setOperationName, setResourceName, setSamplingPriority, setServiceName, setSpanType, setTag, setTag, setTag -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Method Detail
-
getTraceId
DDTraceId getTraceId()
-
getSpanId
long getSpanId()
-
setRequestBlockingAction
void setRequestBlockingAction(Flow.Action.RequestBlockingAction rba)
-
getRequestBlockingAction
Flow.Action.RequestBlockingAction getRequestBlockingAction()
-
isError
boolean isError()
-
setMetric
AgentSpan setMetric(CharSequence key, int value)
-
setMetric
AgentSpan setMetric(CharSequence key, long value)
-
setMetric
AgentSpan setMetric(CharSequence key, double value)
-
getStartTime
long getStartTime()
-
getDurationNano
long getDurationNano()
-
getOperationName
String getOperationName()
-
setOperationName
AgentSpan setOperationName(CharSequence serviceName)
-
getServiceName
String getServiceName()
-
setServiceName
AgentSpan setServiceName(String serviceName)
-
getResourceName
CharSequence getResourceName()
-
setResourceName
AgentSpan setResourceName(CharSequence resourceName)
-
setResourceName
AgentSpan setResourceName(CharSequence resourceName, byte priority)
Implementation note: two calls with the same priority will result in the second resource namebeing used
-
eligibleForDropping
boolean eligibleForDropping()
-
getRequestContext
RequestContext getRequestContext()
RequestContext for the Instrumentation Gateway
-
forceSamplingDecision
Integer forceSamplingDecision()
-
setSamplingPriority
AgentSpan setSamplingPriority(int newPriority, int samplingMechanism)
-
getSamplingPriority
Integer getSamplingPriority()
-
setSamplingPriority
AgentSpan setSamplingPriority(int newPriority)
-
getSpanType
String getSpanType()
-
setSpanType
AgentSpan setSpanType(CharSequence type)
-
setTag
AgentSpan setTag(String key, CharSequence value)
-
setMeasured
AgentSpan setMeasured(boolean measured)
-
getRootSpan
AgentSpan getRootSpan()
-
setErrorMessage
AgentSpan setErrorMessage(String errorMessage)
-
addThrowable
AgentSpan addThrowable(Throwable throwable)
-
addThrowable
AgentSpan addThrowable(Throwable throwable, byte errorPriority)
-
setHttpStatusCode
AgentSpan setHttpStatusCode(int statusCode)
-
getHttpStatusCode
short getHttpStatusCode()
-
getLocalRootSpan
AgentSpan getLocalRootSpan()
Returns the root span for current the trace fragment. In the context of distributed tracingthis method returns the root span only for the fragment generated by the currently tracedapplication.
-
isSameTrace
boolean isSameTrace(AgentSpan otherSpan)
-
context
AgentSpan.Context context()
-
getBaggageItem
String getBaggageItem(String key)
-
setBaggageItem
AgentSpan setBaggageItem(String key, String value)
-
finish
void finish()
-
finish
void finish(long finishMicros)
-
finishWithDuration
void finishWithDuration(long durationNanos)
-
beginEndToEnd
void beginEndToEnd()
Marks the start of a message pipeline where we want to track end-to-end processing time.
-
finishWithEndToEnd
void finishWithEndToEnd()
Marks the end of a message pipeline where the final end-to-end processing time is recorded.
Note: this will also finish the span and publish it.
-
phasedFinish
boolean phasedFinish()
Finishes the span but does not publish it. The publish method MUST be called onceotherwise the trace will not be reported.
-
publish
void publish()
Publish a span that was previously finished by calling phasedFinish. Must be calledonce and only once per span.
-
getSpanName
String getSpanName()
-
setSpanName
void setSpanName(CharSequence spanName)
-
hasResourceName
boolean hasResourceName()
Deprecated in favor of setResourceName(final CharSequence resourceName, byte priority) or usinggetResourceNamePriority() for comparisons.
-
getResourceNamePriority
byte getResourceNamePriority()
-
traceConfig
TraceConfig traceConfig()
-
addLink
void addLink(AgentSpanLink link)
-
-
-
-