Package io.opentelemetry.sdk.trace
Class NoopSpanProcessor
java.lang.Object
io.opentelemetry.sdk.trace.NoopSpanProcessor
- All Implemented Interfaces:
SpanProcessor
,Closeable
,AutoCloseable
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) static SpanProcessor
boolean
Returnstrue
if thisSpanProcessor
requires end events.boolean
Returnstrue
if thisSpanProcessor
requires start events.void
onEnd
(ReadableSpan span) Called when aSpan
is ended, if theSpan.isRecording()
returns true.void
onStart
(Context parentContext, ReadWriteSpan span) Called when aSpan
is started, if theSpan.isRecording()
returns true.toString()
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 Details
-
INSTANCE
-
-
Constructor Details
-
NoopSpanProcessor
private NoopSpanProcessor()
-
-
Method Details
-
getInstance
-
onStart
Description copied from interface:SpanProcessor
Called when aSpan
is 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:
onStart
in interfaceSpanProcessor
- Parameters:
parentContext
- the parentContext
of the span that just started.span
- theSpan
that just started.
-
isStartRequired
public boolean isStartRequired()Description copied from interface:SpanProcessor
Returnstrue
if thisSpanProcessor
requires start events.- Specified by:
isStartRequired
in interfaceSpanProcessor
- Returns:
true
if thisSpanProcessor
requires start events.
-
onEnd
Description copied from interface:SpanProcessor
Called when aSpan
is 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:
onEnd
in interfaceSpanProcessor
- Parameters:
span
- theSpan
that just ended.
-
isEndRequired
public boolean isEndRequired()Description copied from interface:SpanProcessor
Returnstrue
if thisSpanProcessor
requires end events.- Specified by:
isEndRequired
in interfaceSpanProcessor
- Returns:
true
if thisSpanProcessor
requires end events.
-
toString
-