Package io.opentelemetry.sdk.trace
Class NoopSpanProcessor
- java.lang.Object
-
- io.opentelemetry.sdk.trace.NoopSpanProcessor
-
- All Implemented Interfaces:
SpanProcessor,java.io.Closeable,java.lang.AutoCloseable
final class NoopSpanProcessor extends java.lang.Object implements SpanProcessor
-
-
Field Summary
Fields Modifier and Type Field Description private static NoopSpanProcessorINSTANCE
-
Constructor Summary
Constructors Modifier Constructor Description privateNoopSpanProcessor()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) static SpanProcessorgetInstance()booleanisEndRequired()Returnstrueif thisSpanProcessorrequires end events.booleanisStartRequired()Returnstrueif thisSpanProcessorrequires start events.voidonEnd(ReadableSpan span)Called when aSpanis ended, if theSpan.isRecording()returns true.voidonStart(Context parentContext, ReadWriteSpan span)Called when aSpanis started, if theSpan.isRecording()returns true.java.lang.StringtoString()-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface io.opentelemetry.sdk.trace.SpanProcessor
close, forceFlush, shutdown
-
-
-
-
Field Detail
-
INSTANCE
private static final NoopSpanProcessor INSTANCE
-
-
Method Detail
-
getInstance
static SpanProcessor getInstance()
-
onStart
public void onStart(Context parentContext, ReadWriteSpan span)
Description copied from interface:SpanProcessorCalled when aSpanis started, if theSpan.isRecording()returns true.This method is called synchronously on the execution thread, should not throw or block the execution thread.
- Specified by:
onStartin interfaceSpanProcessor- Parameters:
parentContext- the parentContextof the span that just started.span- theSpanthat just started.
-
isStartRequired
public boolean isStartRequired()
Description copied from interface:SpanProcessorReturnstrueif thisSpanProcessorrequires start events.- Specified by:
isStartRequiredin interfaceSpanProcessor- Returns:
trueif thisSpanProcessorrequires start events.
-
onEnd
public void onEnd(ReadableSpan span)
Description copied from interface:SpanProcessorCalled when aSpanis ended, if theSpan.isRecording()returns true.This method is called synchronously on the execution thread, should not throw or block the execution thread.
- Specified by:
onEndin interfaceSpanProcessor- Parameters:
span- theSpanthat just ended.
-
isEndRequired
public boolean isEndRequired()
Description copied from interface:SpanProcessorReturnstrueif thisSpanProcessorrequires end events.- Specified by:
isEndRequiredin interfaceSpanProcessor- Returns:
trueif thisSpanProcessorrequires end events.
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-