public final class NoopExtendedTracerImpl extends java.lang.Object implements ExtendedTracer, io.opentracing.NoopTracer
ExtendedTracer interface. Simply delegates calls
to the NoopTracer of the opentracing.io.| Modifier and Type | Field and Description |
|---|---|
static NoopExtendedTracerImpl |
INSTANCE
Instance for usage.
|
| Modifier and Type | Method and Description |
|---|---|
io.opentracing.Tracer.SpanBuilder |
buildSpan()
Builds span with no operation name.
|
io.opentracing.Tracer.SpanBuilder |
buildSpan(java.lang.String operationName) |
io.opentracing.Tracer.SpanBuilder |
buildSpan(java.lang.String operationName,
java.lang.String referenceType,
boolean useThreadContext)
Creates
SpanBuilder that optionally adds the reference to the current thread context
span. |
<C> io.opentracing.SpanContext |
extract(io.opentracing.propagation.Format<C> format,
C carrier) |
io.opentracing.SpanContext |
getCurrentContext()
Returns the current thread span context if one exists.
|
<C> void |
inject(io.opentracing.SpanContext spanContext,
io.opentracing.propagation.Format<C> format,
C carrier) |
<C> void |
registerPropagator(io.opentracing.propagation.Format<C> format,
Propagator<C> propagator)
Registers propagator.
|
void |
setTimer(Timer timer)
Sets the implementation of the
Timer to use. |
public static final NoopExtendedTracerImpl INSTANCE
public io.opentracing.Tracer.SpanBuilder buildSpan(java.lang.String operationName)
buildSpan in interface io.opentracing.Tracerpublic <C> void inject(io.opentracing.SpanContext spanContext,
io.opentracing.propagation.Format<C> format,
C carrier)
inject in interface io.opentracing.Tracerpublic <C> io.opentracing.SpanContext extract(io.opentracing.propagation.Format<C> format,
C carrier)
extract in interface io.opentracing.Tracerpublic <C> void registerPropagator(io.opentracing.propagation.Format<C> format,
Propagator<C> propagator)
TextMapPropagator for
the io.opentracing.propagation.Format.Builtin.TEXT_MAP and
UrlEncodingPropagator
for the io.opentracing.propagation.Format.Builtin.HTTP_HEADERS format.registerPropagator in interface ExtendedTracerC - format typeformat - opentracing Formatpropagator - Propagatorpublic void setTimer(Timer timer) throws java.lang.IllegalArgumentException
Timer to use.
By default inspectIT tracer uses
SystemTimer that has millisecond
start time precision. This done so inspectIT can be compatible with Java 6. Users can provide
better timers if they run on higher Java versions or have third party dependencies that could
do better.
setTimer in interface ExtendedTracertimer - Timer to set. Must not be null.java.lang.IllegalArgumentException - If timer provided is null.public io.opentracing.Tracer.SpanBuilder buildSpan()
buildSpan in interface ExtendedTracerSpanBuilder.public io.opentracing.Tracer.SpanBuilder buildSpan(java.lang.String operationName,
java.lang.String referenceType,
boolean useThreadContext)
SpanBuilder that optionally adds the reference to the current thread context
span.buildSpan in interface ExtendedTraceroperationName - Operation name of the span.referenceType - Reference type to the current context. Can be null if
useThreadContext=falseuseThreadContext - If thread context should be used.SpanBuilder.public io.opentracing.SpanContext getCurrentContext()
null.
The noop tracer implementation should always return the
NoopSpanContext instance here.
getCurrentContext in interface ExtendedTracernull if thread has no such spans.